/* 게시판(공식블로그, 베테랑스 소식) 목록과 상세 */

:root {
  --post-color-navy: #050423;
  --post-color-accent: #b8860b;
  --post-color-muted: #999999;
}

/* 목록 */
.post-board {
  background-color: #fafafa;
}

.post-board__hero {
  padding: 70px 15px 60px;
  background: linear-gradient(#050819, #10182e);
  text-align: center;
}

.post-board__badge {
  display: inline-flex;
  vertical-align: top;
  align-items: center;
  gap: 5px;
  margin-bottom: 12.5px;
  padding: 3.75px 10px;
  border: 1px solid rgba(232, 216, 168, 0.35);
  border-radius: 9999px;
  background-color: rgba(255, 255, 255, 0.1);
  color: #e8d8a8;
  font-size: 13px;
  font-weight: 500;
}

.post-board__badge span {
  color: #d4af37;
  font-size: 10px;
}

.post-board__title {
  margin-bottom: 10px;
  color: var(--color-white);
  font-size: 48px;
  font-weight: 700;
  line-height: 1.25;
}

.post-board__subtitle {
  margin-bottom: 20px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 17px;
}

.post-board__search {
  position: relative;
  max-width: 520px;
  margin: 0 auto;
}

.post-board__search input {
  width: 100%;
  padding: 8.75px 35px 8.75px 15px;
  border: 0;
  border-radius: 9999px;
  background-color: var(--color-white);
  color: var(--color-heading);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.5;
}

.post-board__search button {
  position: absolute;
  top: 50%;
  right: 12.5px;
  display: block;
  padding: 0;
  border: 0;
  background: none;
  color: var(--post-color-muted);
  line-height: 0;
  transform: translateY(-50%);
}

.post-board__body {
  min-height: 100vh;
  padding: 50px 15px 80px;
}

.post-board__list-title {
  margin-bottom: 15px;
  color: var(--post-color-navy);
  font-size: 26px;
  font-weight: 700;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
}

.post-card {
  display: block;
  border: 1px solid var(--color-line);
  border-radius: 12px;
  background-color: var(--color-white);
  overflow: hidden;
  transition:
    transform 0.3s,
    box-shadow 0.3s;
}

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

.post-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  transform: translateY(-4px);
}

.post-card__thumbnail {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: var(--color-surface);
}

.post-card__thumbnail img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-card__categories {
  position: absolute;
  top: 7.5px;
  left: 7.5px;
  display: flex;
  gap: 3.75px;
}

.post-card__categories span,
.post-detail__categories span {
  border-radius: 9999px;
  background-color: var(--post-color-accent);
  color: var(--color-white);
  font-weight: 600;
}

.post-card__categories span {
  padding: 2.5px 6.25px;
  font-size: 11px;
}

.post-card__body {
  padding: 12.5px;
  text-align: left;
}

.post-card__title,
.post-card__excerpt {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.post-card__title {
  margin-bottom: 5px;
  color: var(--color-heading);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.375;
}

.post-card__excerpt {
  margin-bottom: 10px;
  color: #777777;
  font-size: 14px;
  line-height: 1.625;
}

.post-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--post-color-muted);
  font-size: 13px;
}

.post-board__empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40vh;
  color: #9ca3af;
  font-size: 15px;
}

.post-board__empty[hidden] {
  display: none;
}

/* 상세 */
.post-detail {
  background-color: var(--color-white);
}

.post-detail__inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 50px 15px 80px;
}

.post-detail__back {
  display: inline-block;
  margin-bottom: 15px;
  color: var(--post-color-navy);
  font-size: 15px;
  font-weight: 500;
}

.post-detail__categories {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 10px;
}

.post-detail__categories span {
  padding: 2.5px 7.5px;
  font-size: 12px;
}

.post-detail__title {
  margin-bottom: 10px;
  color: var(--color-heading);
  font-size: 42px;
  font-weight: 700;
  line-height: 1.25;
}

.post-detail__excerpt {
  margin-bottom: 7.5px;
  color: #777777;
  font-size: 16px;
  line-height: 1.625;
}

.post-detail__keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 7.5px;
  color: var(--post-color-muted);
  font-size: 13px;
}

.post-detail__info {
  margin-bottom: 15px;
  color: var(--post-color-muted);
  font-size: 14px;
}

.post-detail__info span {
  margin: 0 5px;
}

.post-detail__share {
  position: relative;
  display: inline-block;
}

.post-detail__share button {
  padding: 5px 12.5px;
  border: 1px solid #dddddd;
  border-radius: 9999px;
  background-color: var(--color-white);
  color: var(--color-text);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
}

.post-detail__share-status {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  z-index: 10;
  padding: 3.75px 7.5px;
  border-radius: 3.75px;
  background-color: var(--color-text);
  color: var(--color-white);
  font-size: 12.5px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%);
  transition: opacity 0.25s ease;
}

.post-detail__share-status.is-visible {
  opacity: 1;
}

.post-detail__divider {
  margin: 20px 0;
  border: 0;
  border-top: 1px solid var(--color-line);
}

/* 본문 (편집기에서 작성한 HTML) */
.post-content {
  color: var(--color-text);
  font-size: 16px;
  line-height: 1.8;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.post-content p {
  margin: 8px 0;
}

.post-content img {
  display: inline-block;
  max-width: 100%;
  height: auto;
  margin: 16px 0;
}

.post-content a {
  color: #0066cc;
  text-decoration: underline;
}

.post-content strong,
.post-content b {
  font-weight: 700;
}

.post-content .ql-align-center {
  text-align: center;
}

.post-content .ql-align-right {
  text-align: right;
}

.post-content .ql-align-justify {
  text-align: justify;
}

/* 관리자 에디터(BlockNote)로 쓴 본문. 정렬·색 클래스는 html-sanitizer 가 붙인다. */
.post-content h2,
.post-content h3,
.post-content h4 {
  margin: 32px 0 12px;
  font-weight: 700;
  line-height: 1.4;
}

.post-content h2 {
  font-size: 26px;
}

.post-content h3 {
  font-size: 21px;
}

.post-content h4 {
  font-size: 18px;
}

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

.post-content ul {
  list-style: disc;
}

.post-content ol {
  list-style: decimal;
}

.post-content li > p {
  margin: 2px 0;
}

.post-content blockquote {
  margin: 16px 0;
  padding: 4px 0 4px 16px;
  border-left: 3px solid var(--color-line);
  color: #555555;
}

.post-content hr {
  margin: 24px 0;
  border: 0;
  border-top: 1px solid var(--color-line);
}

.post-content figure {
  margin: 16px 0;
}

.post-content figure img {
  margin: 0;
}

.post-content figcaption {
  margin-top: 6px;
  color: #777777;
  font-size: 14px;
}

.post-content table {
  width: 100%;
  margin: 16px 0;
  border-collapse: collapse;
}

.post-content th,
.post-content td {
  padding: 8px 10px;
  border: 1px solid var(--color-line);
  vertical-align: top;
}

.post-content td > p,
.post-content th > p {
  margin: 0;
}

.post-content .bn-align-center {
  text-align: center;
}

.post-content .bn-align-right {
  text-align: right;
}

.post-content .bn-align-justify {
  text-align: justify;
}

.post-content .bn-text-gray {
  color: #9b9a97;
}

.post-content .bn-bg-gray {
  background-color: #ebeced;
}

.post-content .bn-text-brown {
  color: #64473a;
}

.post-content .bn-bg-brown {
  background-color: #e9e5e3;
}

.post-content .bn-text-red {
  color: #e03e3e;
}

.post-content .bn-bg-red {
  background-color: #fbe4e4;
}

.post-content .bn-text-orange {
  color: #d9730d;
}

.post-content .bn-bg-orange {
  background-color: #f6e9d9;
}

.post-content .bn-text-yellow {
  color: #dfab01;
}

.post-content .bn-bg-yellow {
  background-color: #fbf3db;
}

.post-content .bn-text-green {
  color: #4d6461;
}

.post-content .bn-bg-green {
  background-color: #ddedea;
}

.post-content .bn-text-blue {
  color: #0b6e99;
}

.post-content .bn-bg-blue {
  background-color: #ddebf1;
}

.post-content .bn-text-purple {
  color: #6940a5;
}

.post-content .bn-bg-purple {
  background-color: #eae4f2;
}

.post-content .bn-text-pink {
  color: #ad1a72;
}

.post-content .bn-bg-pink {
  background-color: #f4dfeb;
}

@media (max-width: 767px) {
  .post-board__title {
    font-size: 36px;
  }

  .post-board__subtitle {
    font-size: 15px;
  }

  .post-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .post-detail__title {
    font-size: 32px;
  }
}
