/* SEORYU.COM — Blog styles (extends /styles.css)
 * Palette inherits from /styles.css :root tokens
 */

.nav-active {
  color: var(--color-navy);
  font-weight: 700;
}

/* ---------- Blog hero ---------- */
.blog-hero {
  background: linear-gradient(180deg, var(--color-cloud-soft) 0%, var(--color-white) 100%);
  padding: 80px 0 56px;
  border-bottom: 1px solid var(--color-line);
}

.blog-hero-title {
  font-size: 36px;
  line-height: 1.3;
  font-weight: 800;
  color: var(--color-navy);
  margin: 12px 0 16px;
  letter-spacing: -0.02em;
}

.blog-hero-sub {
  font-size: 17px;
  line-height: 1.7;
  color: var(--color-ink-soft);
  max-width: 720px;
  margin: 0 0 24px;
}

.blog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
  max-height: 40px;
  overflow: hidden;
  transition: max-height 0.25s ease;
}
.blog-tags.blog-tags--expanded {
  max-height: 1000px;
}
.blog-tag-toggle {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: 6px;
  padding: 0;
  background: none;
  border: none;
  color: var(--color-ink-soft);
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
  opacity: 0.75;
}
.blog-tag-toggle:hover {
  opacity: 1;
  color: var(--color-navy, #0f2540);
}

.blog-tag {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--color-white);
  border: 1px solid var(--color-line);
  font-size: 13px;
  color: var(--color-ink-soft);
  cursor: pointer;
  font-family: inherit;
  line-height: 1.5;
  transition: background .15s, color .15s, border-color .15s;
}
.blog-tag:hover {
  background: var(--color-navy, #0f2540);
  color: #fff;
  border-color: var(--color-navy, #0f2540);
}
.blog-tag--active {
  background: var(--color-navy, #0f2540);
  color: #fff;
  border-color: var(--color-navy, #0f2540);
}

/* ---------- Blog list ---------- */
.blog-list {
  padding: 56px 0 80px;
}

/* ---------- Search ---------- */
.blog-search {
  margin: 20px 0 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.blog-search-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.blog-search-input {
  flex: 1 1 320px;
  min-width: 0;
  padding: 12px 16px;
  font-size: 15px;
  line-height: 1.4;
  color: var(--color-navy);
  background: var(--color-white);
  border: 1px solid var(--color-line);
  border-radius: 10px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.blog-search-input:focus {
  outline: none;
  border-color: var(--color-gold-soft);
  box-shadow: 0 0 0 3px rgba(218, 165, 32, 0.12);
}

.blog-search-status {
  margin: 0;
  font-size: 13px;
  color: var(--color-mute);
}

.blog-search-empty {
  margin: 24px 0 0;
  padding: 24px;
  text-align: center;
  font-size: 14px;
  color: var(--color-ink-soft);
  background: var(--color-cloud-soft);
  border-radius: var(--radius);
}

.post-card[hidden] { display: none !important; }

.post-list {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: grid;
  gap: 16px;
}

.post-card {
  background: var(--color-white);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.post-card:hover {
  transform: translateY(-2px);
  border-color: var(--color-gold-soft);
  box-shadow: 0 4px 16px rgba(15, 37, 64, 0.08);
}

.post-card-link {
  display: block;
  padding: 28px 28px 24px;
  text-decoration: none;
  color: inherit;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--color-mute);
  margin-bottom: 10px;
}

.post-card-tag {
  color: var(--color-gold);
  font-weight: 600;
}

.post-card-dot {
  color: var(--color-line);
}

.post-card-title {
  font-size: 22px;
  line-height: 1.4;
  font-weight: 700;
  color: var(--color-navy);
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}

.post-card-summary {
  font-size: 15px;
  line-height: 1.7;
  color: var(--color-ink-soft);
  margin: 0 0 14px;
}

.post-card-cta {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-navy);
}

.blog-foot-note {
  margin: 36px 0 0;
  padding: 18px 20px;
  background: var(--color-cloud-soft);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--color-ink-soft);
  line-height: 1.6;
}

.blog-foot-note a {
  color: var(--color-navy);
  font-weight: 600;
}

/* ---------- Pagination ---------- */
.blog-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 40px 0 0;
  flex-wrap: wrap;
}

.blog-pagination[hidden] {
  display: none;
}

.blog-pagination-list {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.blog-pagination-arrow,
.blog-pagination-page {
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--color-line);
  background: var(--color-white);
  color: var(--color-ink-soft);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.blog-pagination-arrow:hover:not([disabled]),
.blog-pagination-page:hover:not([aria-current]) {
  border-color: var(--color-gold-soft);
  color: var(--color-navy);
}

.blog-pagination-arrow[disabled] {
  opacity: 0.35;
  cursor: not-allowed;
}

.blog-pagination-page[aria-current="page"] {
  background: var(--color-navy);
  border-color: var(--color-navy);
  color: var(--color-white);
  cursor: default;
}

.blog-pagination-ellipsis {
  min-width: 28px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-mute);
  font-size: 14px;
  list-style: none;
}

@media (max-width: 480px) {
  .blog-pagination {
    gap: 6px;
  }
  .blog-pagination-arrow,
  .blog-pagination-page {
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    font-size: 13px;
  }
}

/* ---------- Post page ---------- */
.post-breadcrumb {
  padding: 24px 0 0;
  font-size: 13px;
  color: var(--color-mute);
}

.post-breadcrumb a {
  color: var(--color-mute);
  text-decoration: none;
}

.post-breadcrumb a:hover {
  color: var(--color-navy);
}

.post-breadcrumb-sep {
  margin: 0 6px;
  color: var(--color-line);
}

.post-article {
  padding: 24px 0 64px;
}

.post-header {
  max-width: 760px;
  margin: 0 auto 32px;
  padding: 0 0 24px;
  border-bottom: 1px solid var(--color-line);
}

.post-title {
  font-size: 32px;
  line-height: 1.35;
  font-weight: 800;
  color: var(--color-navy);
  margin: 12px 0 16px;
  letter-spacing: -0.02em;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 14px;
  color: var(--color-mute);
}

.post-meta-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--color-cloud);
  color: var(--color-navy);
  font-weight: 600;
  font-size: 12px;
}

.post-body {
  max-width: 760px;
  margin: 0 auto;
  font-size: 16px;
  line-height: 1.8;
  color: var(--color-ink);
}

.post-body h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-navy);
  margin: 48px 0 16px;
  letter-spacing: -0.01em;
}

.post-body h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-navy);
  margin: 32px 0 12px;
}

.post-body p {
  margin: 0 0 16px;
}

.post-body ul,
.post-body ol {
  margin: 0 0 18px;
  padding-left: 24px;
}

.post-body li {
  margin: 6px 0;
}

.post-body strong {
  color: var(--color-navy);
}

.post-body a {
  color: var(--color-navy);
  text-decoration: underline;
  text-decoration-color: var(--color-gold-soft);
  text-underline-offset: 3px;
}

.post-body code {
  background: var(--color-cloud);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 14px;
  color: var(--color-navy);
}

.post-callout {
  margin: 24px 0;
  padding: 20px 22px;
  background: var(--color-cloud-soft);
  border-left: 4px solid var(--color-gold);
  border-radius: var(--radius-sm);
}

.post-callout p:last-child {
  margin-bottom: 0;
}

.post-callout strong {
  color: var(--color-navy);
}

/* 근거 박스 — AEO/GEO 최적화 구조화 메타데이터 */
.post-ref-box {
  margin: 0 0 20px 0;
  padding: 14px 18px;
  background: var(--seo-teal-50, #eff8f7);
  border: 1px solid var(--seo-teal-100, #d6eeec);
  border-top: 3px solid var(--seo-teal-600, #1e8a8a);
  border-radius: var(--radius-sm, 6px);
  font-size: 13px;
  line-height: 1.5;
}

.post-ref-box .post-ref-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--seo-teal-700, #145e5e);
  margin-bottom: 10px;
}

.post-ref-box .post-ref-row {
  display: flex;
  gap: 12px;
  padding: 5px 0;
  border-bottom: 1px solid rgba(30, 138, 138, 0.1);
}

.post-ref-box .post-ref-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.post-ref-box dt {
  flex: 0 0 104px;
  font-weight: 600;
  color: var(--seo-teal-700, #145e5e);
  font-size: 12px;
}

.post-ref-box dd {
  margin: 0;
  color: var(--seo-ink-2, #2a3742);
  font-size: 13px;
}

@media (max-width: 479px) {
  .post-ref-box .post-ref-row {
    flex-direction: column;
    gap: 1px;
  }
  .post-ref-box dt {
    flex: none;
  }
}

.post-table-wrap,
.post-body table {
  margin: 22px 0;
}

.post-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  line-height: 1.6;
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--color-line);
  border-radius: 8px;
  background: var(--color-white);
}

.post-body table thead,
.post-body table tbody,
.post-body table tr {
  display: table;
  width: 100%;
  table-layout: fixed;
}

.post-body table th,
.post-body table td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  border-right: 1px solid var(--color-line);
  border-bottom: 1px solid var(--color-line);
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.post-body table th:last-child,
.post-body table td:last-child {
  border-right: 0;
}

.post-body table tr:last-child td {
  border-bottom: 0;
}

.post-body table thead th {
  background: var(--color-navy);
  color: var(--color-white);
  font-weight: 700;
  font-size: 13.5px;
  letter-spacing: -0.01em;
  border-right-color: rgba(255, 255, 255, 0.15);
  border-bottom: 2px solid var(--color-navy);
}

.post-body table thead th:last-child {
  border-right: 0;
}

.post-body table tbody tr:nth-child(even) td {
  background: var(--color-cloud-soft, #f6f8fb);
}

.post-body table tbody tr:hover td {
  background: var(--color-cloud, #eef2f7);
}

.post-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

@media (max-width: 640px) {
  .post-body table {
    font-size: 13.5px;
  }
  .post-body table th,
  .post-body table td {
    padding: 10px 11px;
  }
}

.post-cta {
  margin: 48px auto 0;
  max-width: 760px;
  padding: 28px;
  background: var(--color-navy);
  color: var(--color-white);
  border-radius: var(--radius);
  text-align: center;
}

.post-cta h3 {
  color: var(--color-white);
  font-size: 20px;
  margin: 0 0 8px;
}

.post-cta p {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 15px;
  line-height: 1.7;
}

.post-cta-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.post-cta .btn-primary {
  background: var(--color-gold);
  color: var(--color-navy);
  border: none;
}

.post-cta .btn-ghost-light {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: var(--color-white);
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
}

.post-contact.quick-contact {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-width: 440px;
  margin: 28px auto 0;
}

.post-contact-card {
  min-height: 118px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 12px;
  border: 1px solid var(--color-line);
  border-radius: 14px;
  background: var(--color-white);
  color: var(--color-navy);
  text-align: center;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(15, 37, 64, 0.06);
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.post-contact-card::before {
  content: "";
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--color-cloud);
  background-position: center;
  background-repeat: no-repeat;
  background-size: 20px 20px;
}

.post-contact-card[href^="tel:"]::before {
  background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.13.96.37 1.9.72 2.81a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.91.35 1.85.59 2.81.72A2 2 0 0 1 22 16.92z' stroke='%230A1320' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.post-contact-card[href*="pf.kakao.com"]::before {
  background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 24 24' fill='%230A1320' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 3C6.48 3 2 6.58 2 11c0 2.79 1.86 5.24 4.66 6.65l-.81 2.97a.5.5 0 0 0 .73.55L10.5 19c.49.05.99.08 1.5.08 5.52 0 10-3.58 10-8s-4.48-8-10-8z'/%3E%3C/svg%3E");
}

.post-contact-card:hover {
  transform: translateY(-2px);
  border-color: rgba(15, 37, 64, 0.18);
  box-shadow: 0 14px 28px rgba(15, 37, 64, 0.1);
}

.post-contact-label,
.post-contact-card strong {
  display: block;
}

.post-contact-label {
  color: var(--color-navy);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
}

.post-contact-card strong {
  color: var(--color-mute);
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.35;
}

.post-related {
  max-width: 760px;
  margin: 48px auto 0;
  padding-top: 32px;
  border-top: 1px solid var(--color-line);
}

.post-related h3 {
  font-size: 16px;
  color: var(--color-mute);
  margin: 0 0 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.post-related ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.post-related li {
  margin: 8px 0;
}

.post-related a {
  color: var(--color-navy);
  font-weight: 600;
}

/* Post-page header: collapse the inline desktop nav to a hamburger on mobile.
   The hamburger + drawer is injected by /blog/post-nav.js (progressive
   enhancement); this rule prevents a flash of the cramped nav before JS runs. */
@media (max-width: 880px) {
  .nav-shell .nav-desktop,
  .site-header .header-nav { display: none !important; }
}

/* ---------- Responsive ---------- */
/* ---------- 공식근거 요약 카드 ---------- */
.law-basis-card {
  margin: 0 0 24px;
  padding: 20px 22px;
  background: var(--color-white);
  border: 1px solid rgba(15, 37, 64, 0.18);
  border-left: 4px solid var(--color-navy);
  border-radius: var(--radius-sm);
}

.law-basis-card__label {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--color-navy);
  opacity: 0.55;
  margin-bottom: 14px;
}

.law-basis-card dl {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.law-basis-row {
  display: grid;
  grid-template-columns: 7.5em 1fr;
  gap: 0 12px;
  font-size: 14px;
  line-height: 1.65;
}

.law-basis-row dt {
  font-weight: 700;
  color: var(--color-navy);
  white-space: nowrap;
}

.law-basis-row dd {
  margin: 0;
  color: var(--color-ink);
}

.law-basis-row dd a {
  color: var(--color-navy);
  text-decoration: underline;
  text-decoration-color: var(--color-gold-soft);
  text-underline-offset: 2px;
  font-weight: 600;
}

@media (max-width: 480px) {
  .law-basis-row {
    grid-template-columns: 1fr;
    gap: 1px;
  }
  .law-basis-row dt::after {
    content: ":";
  }
}

@media (max-width: 720px) {
  .blog-tags {
    max-height: 60px; /* ~1.5행 (행당 ~32px + gap 8px) */
  }

  .blog-hero {
    padding: 56px 0 40px;
  }
  .blog-hero-title {
    font-size: 28px;
  }
  .blog-hero-sub {
    font-size: 16px;
  }
  .post-card-link {
    padding: 22px 20px 20px;
  }
  .post-card-title {
    font-size: 19px;
  }
  .post-title {
    font-size: 26px;
  }
  .post-body {
    font-size: 15.5px;
  }
  .post-body h2 {
    font-size: 21px;
    margin-top: 36px;
  }
  .post-cta {
    padding: 24px 20px;
  }
  .post-contact.quick-contact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .post-contact-card {
    min-height: 112px;
  }
}
