/*
Theme Name: 쫑긋 (Jjonggeut)
Theme URI: https://hearthem.net
Author: 쫑긋
Description: 동물법 리서치 플랫폼 쫑긋의 블록 테마. 생활 판례와 쫑긋 리포트 글 유형, 주제·자료 유형·국가 분류를 포함합니다.
Version: 0.1.1
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: jjonggeut
*/

/* ---------- 기본 ---------- */
:root { --jg-wide: 1120px; --jg-read: 760px; }
body { -webkit-font-smoothing: antialiased; }
a:focus-visible, button:focus-visible, .wp-element-button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--wp--preset--color--accent); outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

.jg-section { padding: 72px 24px; }
.jg-section > * { max-width: var(--jg-wide); margin-left: max(0px, calc((100% - var(--jg-wide)) / 2)) !important; margin-right: auto !important; }
.jg-section.jg-read > * { max-width: var(--jg-read); margin-left: max(0px, calc((100% - var(--jg-read)) / 2)) !important; }
.jg-mist { background: var(--wp--preset--color--mist); }
.jg-peach { background: var(--wp--preset--color--peach); }
.jg-ink { background: var(--wp--preset--color--ink); color: var(--wp--preset--color--white); }
.jg-ink a { color: var(--wp--preset--color--white); }
.jg-ink .jg-sub, .jg-ink .jg-muted { color: #C9D3D9; }

.jg-sub { font-size: 1.125rem; color: var(--wp--preset--color--ink-soft); max-width: 640px; }
.jg-muted { color: var(--wp--preset--color--muted); font-size: 0.875rem; }
.jg-kicker { font-size: 0.875rem; font-weight: 600; color: var(--wp--preset--color--muted); margin-bottom: 8px !important; }
.jg-ink .jg-kicker { color: #C9D3D9; }

/* ---------- 헤더 ---------- */
.jg-header { border-bottom: 1px solid var(--wp--preset--color--line); padding: 16px 24px; }
.jg-header > .wp-block-group { max-width: var(--jg-wide); margin: 0 auto; }
.jg-header .wp-block-site-title a { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--wp--preset--color--ink); }
.jg-header .wp-block-site-title a::before {
  content: ""; width: 32px; height: 32px; flex: 0 0 32px;
  background: url("assets/logo.svg") center / contain no-repeat;
}
.jg-nav .wp-block-navigation-item__content { padding: 10px 0; }
.jg-nav .jg-nav-cta .wp-block-navigation-item__content {
  background: var(--wp--preset--color--ink); color: var(--wp--preset--color--white);
  padding: 10px 18px; border-radius: 999px;
}

/* ---------- 버튼 ---------- */
.wp-block-button.jg-btn-line .wp-block-button__link {
  background: transparent; color: var(--wp--preset--color--ink);
  border: 1.5px solid var(--wp--preset--color--ink); padding: 12.5px 24px;
}
.jg-ink .wp-block-button .wp-block-button__link { background: var(--wp--preset--color--white); color: var(--wp--preset--color--ink); }

/* ---------- 히어로 ---------- */
.jg-hero { padding-top: 88px; padding-bottom: 80px; }
.jg-hero-title { font-size: clamp(2.25rem, 5vw, 3.5rem) !important; line-height: 1.2 !important; letter-spacing: -0.03em; max-width: 760px; }
.jg-hero-title mark { background: none; color: inherit; box-shadow: inset 0 -0.25em 0 color-mix(in srgb, var(--wp--preset--color--accent) 30%, transparent); }

/* ---------- 섹션 머리 ---------- */
.jg-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px !important; }
.jg-head-mascot { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 20px; margin-bottom: 28px !important; }
.jg-head-mascot .wp-block-image { margin: 0; flex: 0 0 84px; }

/* ---------- 카드 목록 ---------- */
.jg-cards { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; padding: 0; }
.jg-list { display: flex !important; flex-direction: column; gap: 16px; padding: 0; }
.jg-card {
  background: var(--wp--preset--color--white); border: 1px solid var(--wp--preset--color--line);
  border-radius: 18px; padding: 26px 28px; height: 100%; box-sizing: border-box;
  display: flex; flex-direction: column; gap: 10px;
}
.jg-peach .jg-card, .is-case .jg-card { border-color: #F0E2D6; }
.jg-list .is-case .jg-card { background: var(--wp--preset--color--peach); }
.jg-card .wp-block-post-title { margin: 0; font-size: 1.375rem; line-height: 1.4; }
.jg-card .wp-block-post-title a { color: var(--wp--preset--color--ink); text-decoration: none; }
.jg-card .wp-block-post-title a:hover { text-decoration: underline; }
.jg-card .wp-block-post-excerpt { color: var(--wp--preset--color--ink-soft); margin: 0; }
.jg-card .wp-block-post-excerpt__more-text { display: none; }
.jg-card .wp-block-post-date { margin-top: auto; }
.jg-ink .jg-card { color: var(--wp--preset--color--ink); }
.jg-ink .jg-card a { color: var(--wp--preset--color--ink); }
.jg-empty { border: 1.5px dashed #C3CBD0; border-radius: 16px; padding: 28px; text-align: center; }
.jg-ink .jg-empty { border-color: #5B6F7C; }

/* ---------- 칩 ---------- */
.jg-chips, .wp-block-post-terms.jg-chip { display: flex; flex-wrap: wrap; gap: 8px; }
.wp-block-post-terms.jg-chip .wp-block-post-terms__separator { display: none; }
.wp-block-post-terms.jg-chip a, .jg-series {
  display: inline-block; background: var(--wp--preset--color--teal-soft); color: var(--wp--preset--color--teal);
  font-size: 0.8125rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; text-decoration: none; line-height: 1.6;
}
.jg-series { background: var(--wp--preset--color--ink); color: var(--wp--preset--color--white); margin: 0 !important; width: fit-content; }
.is-case .jg-series { background: var(--wp--preset--color--accent); color: var(--wp--preset--color--ink); }
.wp-block-tag-cloud.jg-topics { display: flex; flex-wrap: wrap; gap: 8px; }
.wp-block-tag-cloud.jg-topics a {
  font-size: 0.875rem !important; font-weight: 600; color: var(--wp--preset--color--ink); text-decoration: none;
  border: 1.5px solid #C3CBD0; border-radius: 999px; padding: 9px 16px; min-height: 44px; box-sizing: border-box; display: inline-flex; align-items: center;
}
.wp-block-tag-cloud.jg-topics a:hover { border-color: var(--wp--preset--color--accent); background: var(--wp--preset--color--peach); }

/* ---------- 시리즈 탭 ---------- */
.jg-tabs { display: flex; flex-wrap: wrap; gap: 8px; background: var(--wp--preset--color--mist); padding: 6px; border-radius: 999px; width: fit-content; margin-bottom: 20px !important; }
.jg-tabs .wp-block-button__link { background: transparent; color: var(--wp--preset--color--ink); padding: 10px 18px; }
.jg-tabs .wp-block-button.is-current .wp-block-button__link { background: var(--wp--preset--color--ink); color: var(--wp--preset--color--white); }

/* ---------- 제작 과정 ---------- */
.jg-steps { gap: 28px; }
.jg-step-no { font-family: var(--wp--preset--font-family--display); font-weight: 800; font-size: 1.75rem; color: var(--wp--preset--color--accent); margin-bottom: 8px !important; }
.jg-step-title { font-weight: 700; font-size: 1.125rem; margin: 0 0 6px !important; }

/* ---------- 글 상세 ---------- */
.jg-article-head { padding-top: 48px; padding-bottom: 40px; }
.jg-article-head .wp-block-post-title { font-size: clamp(1.875rem, 4vw, 2.5rem); line-height: 1.3; letter-spacing: -0.03em; margin: 16px 0 12px; }
.jg-summary { background: color-mix(in srgb, var(--wp--preset--color--accent) 20%, white); border-radius: 16px; padding: 24px 28px; margin: 0 0 40px !important; }
.jg-summary.is-case { background: var(--wp--preset--color--white); border: 2px solid var(--wp--preset--color--accent); }
.jg-summary-label { font-weight: 700; font-size: 1rem; margin: 0 0 8px !important; }
.jg-summary .wp-block-post-excerpt { margin: 0; font-size: 1.0625rem; }
.jg-summary.is-case .wp-block-post-excerpt { font-size: 1.25rem; font-weight: 600; }
.jg-summary .wp-block-post-excerpt__more-text { display: none; }
.jg-entry { font-size: 1.0625rem; line-height: 1.8; }
.jg-entry h2 { margin-top: 2.2em; }
.jg-entry blockquote, .jg-law { background: var(--wp--preset--color--mist); border-radius: 12px; padding: 18px 22px; border: 0; font-size: 0.9375rem; }
.jg-entry table { font-size: 0.9375rem; }
.jg-entry .wp-block-table { overflow-x: auto; }
.jg-bridge { background: var(--wp--preset--color--ink); color: var(--wp--preset--color--white); border-radius: 18px; padding: 24px 28px; margin-top: 44px !important; }
.jg-bridge a { color: var(--wp--preset--color--white); font-weight: 600; }
.jg-cta-box { background: var(--wp--preset--color--peach); border-radius: 18px; padding: 24px 28px; }
.jg-source { border: 1px solid var(--wp--preset--color--line); border-radius: 16px; padding: 22px 24px; font-size: 0.875rem; }
.jg-disclaimer { font-size: 0.875rem; color: var(--wp--preset--color--muted); margin-top: 32px !important; }

/* ---------- 이야기 보내기 ---------- */
.jg-urgent { background: #FDECEC; border: 1.5px solid #E5A3A3; border-radius: 16px; padding: 20px 24px; }
.jg-urgent .jg-urgent-title { color: #8A1F1F; font-weight: 700; font-size: 1.0625rem; margin: 0 0 4px !important; }
.jg-urgent p { color: #4A2A2A; }
.jg-urgent .wp-block-button__link { background: #8A1F1F; color: #FFFFFF; }
.jg-steps-box { background: var(--wp--preset--color--peach); border-radius: 16px; padding: 24px; }
.jg-steps-box ol { padding-left: 20px; }
.jg-steps-box li { margin-bottom: 10px; }

/* ---------- 소식 받기 ---------- */
.jg-subscribe { background: color-mix(in srgb, var(--wp--preset--color--accent) 20%, white); border-radius: 20px; padding: 40px; }

/* ---------- 함께하는 사람들 ---------- */
.jg-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.jg-person { background: var(--wp--preset--color--white); border-radius: 16px; padding: 24px; }
.jg-person .wp-block-image img { border-radius: 999px; width: 64px; height: 64px; object-fit: cover; }

/* ---------- 푸터 ---------- */
.jg-footer { border-top: 1px solid var(--wp--preset--color--line); padding: 32px 24px 40px; font-size: 0.875rem; color: var(--wp--preset--color--muted); }
.jg-footer > .wp-block-group { max-width: var(--jg-wide); margin: 0 auto; }
.jg-footer a { color: var(--wp--preset--color--muted); }

/* ---------- 페이지 매김 ---------- */
.wp-block-query-pagination { margin-top: 32px; }

@media (max-width: 600px) {
  .jg-section { padding: 56px 20px; }
  .jg-subscribe { padding: 28px 22px; }
  .jg-card { padding: 22px; }
}
