/* 해성한의원 건강칼럼 — 5대 처방 아카이브 */
:root {
  --hs-ink: #142f48;
  --hs-blue: #005bac;
  --hs-blue-dark: #00477f;
  --hs-gold: #dd9c00;
  --hs-green: #008b50;
  --hs-paper: #f5f2e9;
  --hs-mist: #edf4f8;
  --hs-line: #c3d3e4;
}

body.haesung-archive-page {
  background: #fff;
}

body.haesung-archive-page .haesung-archive-index {
  padding: 0 0 96px !important;
  color: var(--hs-ink);
  background: linear-gradient(180deg, #fff 0, #fff 36%, #f7f9fb 100%);
  overflow: clip;
}

.haesung-archive-hero {
  padding: 64px 28px 0;
}

.haesung-archive-hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  min-height: 390px;
  max-width: 1180px;
  margin: 0 auto;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(0, 71, 127, .98), rgba(0, 91, 172, .93)),
    radial-gradient(circle at 75% 30%, rgba(255,255,255,.18), transparent 42%);
  border-radius: 0 32px 0 32px;
  box-shadow: 0 22px 55px rgba(0, 71, 127, .17);
}

.haesung-archive-hero-inner::before,
.haesung-archive-hero-inner::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.haesung-archive-hero-inner::before {
  inset: 0;
  opacity: .12;
  background-image: linear-gradient(rgba(255,255,255,.45) 1px, transparent 1px);
  background-size: 100% 42px;
}

.haesung-archive-hero-inner::after {
  right: 42px;
  bottom: -105px;
  width: 290px;
  height: 290px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 50%;
  box-shadow: 0 0 0 35px rgba(255,255,255,.025), 0 0 0 70px rgba(255,255,255,.025);
}

.haesung-archive-hero-copy {
  position: relative;
  z-index: 2;
  align-self: center;
  max-width: 720px;
  padding: 68px 36px 68px 72px;
}

.haesung-archive-eyebrow,
.haesung-record-feed-code {
  margin: 0;
  color: var(--hs-gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .18em;
}

.haesung-archive-hero h1 {
  margin: 14px 0 20px;
  color: #fff;
  font-family: "Noto Serif KR", serif;
  font-size: clamp(40px, 5vw, 66px);
  font-weight: 900;
  line-height: 1.18;
  letter-spacing: -.05em;
}

.haesung-archive-lede {
  max-width: 650px;
  margin: 0;
  color: rgba(255,255,255,.82);
  font-size: 16px;
  line-height: 1.9;
  word-break: keep-all;
}

.haesung-archive-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 30px;
}

.haesung-archive-topics span {
  min-height: 34px;
  padding: 7px 14px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px;
}

.haesung-archive-ledger {
  position: relative;
  z-index: 2;
  align-self: stretch;
  min-width: 0;
  padding: 52px 46px;
  color: var(--hs-ink);
  background: var(--hs-paper);
  border-left: 7px double rgba(221, 156, 0, .52);
}

.haesung-archive-ledger-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 13px;
  color: var(--hs-blue-dark);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .12em;
  border-bottom: 1px solid rgba(20,47,72,.24);
}

.haesung-archive-ledger > strong {
  display: block;
  margin-top: 14px;
  color: var(--hs-blue);
  font-family: "Noto Serif KR", serif;
  font-size: 118px;
  font-weight: 900;
  line-height: .92;
  letter-spacing: -.09em;
}

.haesung-archive-ledger > p {
  margin: 18px 0 30px;
  color: var(--hs-ink);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.45;
  letter-spacing: .18em;
}

.haesung-archive-ledger-lines {
  display: grid;
  gap: 11px;
}

.haesung-archive-ledger-lines i {
  display: block;
  height: 1px;
  background: rgba(20,47,72,.2);
}

.haesung-record-feed {
  max-width: 1180px !important;
  margin: 0 auto !important;
  padding: 86px 28px 0 !important;
}

.haesung-record-feed-head {
  position: relative;
  max-width: 720px;
  margin: 0 0 34px !important;
  padding-left: 22px;
  border-left: 4px solid var(--hs-gold);
}

.haesung-record-feed-title {
  margin: 8px 0 10px !important;
  color: var(--hs-ink) !important;
  font-family: "Noto Serif KR", serif !important;
  font-size: clamp(27px, 3.2vw, 39px) !important;
  font-weight: 900 !important;
  line-height: 1.35 !important;
  letter-spacing: -.045em;
}

.haesung-record-feed-desc {
  margin: 0;
  color: #526778;
  font-size: 15px;
  line-height: 1.8;
  word-break: keep-all;
}

.haesung-record-grid.wp-block-post-template {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  gap: 30px 26px !important;
}

.haesung-record-grid > .wp-block-post {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 0 !important;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(0,71,127,.17);
  border-top: 4px solid var(--hs-blue);
  border-radius: 0 0 14px 14px;
  box-shadow: 0 6px 25px rgba(20,47,72,.06);
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.haesung-record-grid > .wp-block-post:hover {
  transform: translateY(-3px);
  border-color: rgba(0,71,127,.34);
  box-shadow: 0 16px 36px rgba(20,47,72,.12);
}

.haesung-record-grid .haesung-record-card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1 !important;
  margin: 0 !important;
  overflow: hidden;
  background: var(--hs-mist);
  border-bottom: 1px solid rgba(0,71,127,.12);
}

.haesung-record-grid .haesung-record-card-media a {
  display: block;
  width: 100%;
  height: 100%;
}

.haesung-record-grid .haesung-record-card-media img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  border-radius: 0 !important;
  transition: opacity .22s ease;
}

.haesung-record-grid > .wp-block-post:hover .haesung-record-card-media img {
  opacity: .94;
}

.haesung-record-card-body {
  display: flex !important;
  flex: 1 1 auto;
  flex-direction: column;
  padding: 22px 22px 24px !important;
}

.haesung-record-card-meta {
  width: 100%;
  min-height: 22px;
  margin: 0 !important;
  color: var(--hs-blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
}

.haesung-record-card-meta p,
.haesung-record-card-date {
  margin: 0 !important;
  padding: 0 !important;
  color: inherit;
  font-size: inherit;
}

.haesung-record-card-date time {
  color: #657584;
}

.haesung-record-grid .haesung-record-card-title {
  margin: 13px 0 0 !important;
  padding: 0 !important;
  font-size: 18px !important;
  font-weight: 800 !important;
  line-height: 1.55 !important;
  letter-spacing: -.025em;
}

.haesung-record-grid .haesung-record-card-title a {
  display: -webkit-box;
  overflow: hidden;
  color: var(--hs-ink) !important;
  font-family: "Noto Sans KR", sans-serif !important;
  font-weight: 800 !important;
  line-height: inherit !important;
  text-decoration: none !important;
  word-break: keep-all;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.haesung-record-grid .haesung-record-card-title a:hover {
  color: var(--hs-blue) !important;
}

.haesung-record-grid .haesung-record-card-excerpt {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  margin: 12px 0 0 !important;
  padding: 0 !important;
  color: #5d6c78;
}

.haesung-record-grid .haesung-record-card-excerpt .wp-block-post-excerpt__excerpt {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: inherit;
  font-size: 14px;
  line-height: 1.75;
  word-break: keep-all;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.haesung-record-grid .haesung-record-card-excerpt .wp-block-post-excerpt__more-text {
  margin: auto 0 0;
  padding-top: 18px;
}

.haesung-record-grid .haesung-record-card-excerpt .wp-block-post-excerpt__more-link {
  margin: 0;
  padding: 0;
  color: var(--hs-blue) !important;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .02em;
  text-decoration: none !important;
}

.haesung-record-card-media.is-fallback a {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: var(--hs-blue);
  background:
    repeating-linear-gradient(0deg, transparent 0 37px, rgba(0,91,172,.09) 37px 38px),
    var(--hs-paper);
  text-decoration: none;
}

.haesung-record-fallback-number {
  font-family: "Noto Serif KR", serif;
  font-size: 76px;
  font-weight: 900;
  line-height: 1;
}

.haesung-record-fallback-title {
  margin-top: 12px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .18em;
}

.haesung-record-empty {
  max-width: 680px !important;
  margin: 0 auto !important;
  padding: 64px 28px !important;
  text-align: center;
  background: var(--hs-paper);
  border: 1px solid rgba(0,71,127,.16);
  border-top: 4px solid var(--hs-blue);
}

.haesung-record-empty-code {
  margin: 0 0 12px;
  color: var(--hs-gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .18em;
}

.haesung-record-empty h3 {
  margin: 0 0 8px;
  color: var(--hs-ink);
  font-family: "Noto Serif KR", serif;
  font-size: 24px;
}

.haesung-record-empty p:last-child {
  margin: 0;
  color: #5d6c78;
}

.haesung-record-pagination.wp-block-query-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 48px 0 0;
}

.haesung-record-pagination a,
.haesung-record-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: 44px;
  height: 44px;
  padding: 0 12px;
  color: var(--hs-ink);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  background: #fff;
  border: 1px solid var(--hs-line);
  border-radius: 6px;
  text-decoration: none;
}

.haesung-record-pagination .page-numbers.current {
  color: #fff;
  background: var(--hs-blue-dark);
  border-color: var(--hs-blue-dark);
}

.haesung-record-pagination .page-numbers.dots {
  min-width: 28px;
  padding: 0;
  background: transparent;
  border-color: transparent;
}

.haesung-record-pagination .wp-block-query-pagination-previous,
.haesung-record-pagination .wp-block-query-pagination-next {
  min-width: 44px;
  padding: 0 6px;
  color: var(--hs-blue);
  background: transparent;
  border-color: transparent;
}

.haesung-record-pagination a:hover {
  color: #fff;
  background: var(--hs-blue);
  border-color: var(--hs-blue);
}

.haesung-record-pagination .wp-block-query-pagination-previous:hover,
.haesung-record-pagination .wp-block-query-pagination-next:hover {
  color: var(--hs-blue-dark);
  background: var(--hs-mist);
  border-color: transparent;
}

.haesung-record-card-media a:focus-visible,
.haesung-record-card-title a:focus-visible,
.haesung-record-card-excerpt a:focus-visible,
.haesung-record-pagination a:focus-visible {
  outline: 3px solid var(--hs-gold);
  outline-offset: 3px;
}

@media (max-width: 1099px) {
  .haesung-archive-hero-inner {
    grid-template-columns: minmax(0, 1fr) 280px;
  }

  .haesung-archive-hero-copy {
    padding-left: 52px;
  }

  .haesung-archive-ledger {
    padding: 52px 32px;
  }

  .haesung-record-grid.wp-block-post-template {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 26px 22px !important;
  }
}

@media (max-width: 760px) {
  body.haesung-archive-page .haesung-archive-index {
    padding: 0 0 72px !important;
  }

  .haesung-archive-hero {
    padding: 28px 20px 0;
  }

  .haesung-archive-hero-inner {
    display: block;
    min-height: 0;
    border-radius: 0 22px 0 22px;
  }

  .haesung-archive-hero-copy {
    padding: 54px 28px 42px;
  }

  .haesung-archive-hero h1 {
    font-size: 42px;
  }

  .haesung-archive-ledger {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 8px 22px;
    min-height: 150px;
    padding: 24px 28px;
    border-top: 7px double rgba(221,156,0,.52);
    border-left: 0;
  }

  .haesung-archive-ledger-head {
    grid-column: 1 / -1;
  }

  .haesung-archive-ledger > strong {
    margin: 0;
    font-size: 72px;
  }

  .haesung-archive-ledger > p {
    margin: 0;
    font-size: 12px;
  }

  .haesung-archive-ledger-lines {
    display: none;
  }

  .haesung-record-feed {
    padding: 64px 20px 0 !important;
  }
}

@media (max-width: 680px) {
  .haesung-record-grid.wp-block-post-template {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 24px !important;
  }

  .haesung-record-feed-head {
    margin-bottom: 26px !important;
  }

  .haesung-record-grid .haesung-record-card-title {
    font-size: 17px !important;
  }

  .haesung-record-grid .haesung-record-card-excerpt .wp-block-post-excerpt__excerpt {
    -webkit-line-clamp: 2;
  }
}

@media (max-width: 390px) {
  .haesung-archive-hero,
  .haesung-record-feed {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .haesung-archive-hero-copy {
    padding: 46px 22px 38px;
  }

  .haesung-archive-hero h1 {
    font-size: 38px;
  }

  .haesung-archive-lede {
    font-size: 14px;
  }

  .haesung-archive-topics span {
    padding-inline: 11px;
  }

  .haesung-archive-ledger {
    padding-inline: 22px;
  }

  .haesung-record-card-body {
    padding: 20px 19px 22px !important;
  }

  .haesung-record-pagination.wp-block-query-pagination {
    gap: 4px;
  }

  .haesung-record-pagination a,
  .haesung-record-pagination .page-numbers {
    min-width: 42px;
    height: 44px;
    padding-inline: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .haesung-record-grid > .wp-block-post,
  .haesung-record-grid .haesung-record-card-media img {
    transition: none;
  }

  .haesung-record-grid > .wp-block-post:hover {
    transform: none;
  }
}
