/**
 * Single Post Styles
 *
 * 개별 포스트(뉴스 상세) 페이지 스타일
 * - .post-box: 포스트 컨테이너
 * - .post-header: 포스트 헤더 (제목, 날짜)
 * - .post-content: 포스트 본문
 */

/* ==================== Post Container ==================== */
.post-box {
  width: var(--content-width);
  max-width: var(--content-max-width);
  margin: 40px auto;
  padding: 40px;
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);

  & .post-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;

    & .post-title {
      margin: 0 0 12px 0;
      font-size: 32px;
      font-weight: 700;
      color: #111;
      line-height: 1.4;
    }

    & .post-info {
      display: flex;
      align-items: center;
      gap: 12px;
      font-size: 14px;
      color: #666;

      & .post-date {
        font-weight: 500;
      }
    }
  }

  & .post-content {
    font-size: 16px;
    line-height: 1.8;
    color: #333;

    & p {
      margin-bottom: 1.2em;
    }

    & h2 {
      margin-top: 1.5em;
      margin-bottom: 0.8em;
      font-size: 24px;
      font-weight: 700;
      color: #111;
    }

    & h3 {
      margin-top: 1.3em;
      margin-bottom: 0.6em;
      font-size: 20px;
      font-weight: 600;
      color: #222;
    }

    & img {
      max-width: 100%;
      height: auto;
      border-radius: 8px;
      margin: 1.5em 0;
    }

    & a {
      color: var(--bg-nav-primary);
      text-decoration: underline;
      transition: opacity 0.2s ease;

      &:hover {
        opacity: 0.7;
      }
    }

    & ul,
    & ol {
      margin: 1em 0;
      padding-left: 2em;

      & li {
        margin-bottom: 0.5em;
      }
    }

    & blockquote {
      margin: 1.5em 0;
      padding: 1em 1.5em;
      border-left: 4px solid var(--bg-nav-primary);
      background-color: #f5f5f5;
      font-style: italic;
    }

    & code {
      padding: 2px 6px;
      background-color: #f5f5f5;
      border-radius: 3px;
      font-family: monospace;
      font-size: 0.9em;
    }

    & pre {
      margin: 1.5em 0;
      padding: 1em;
      background-color: #282c34;
      color: #abb2bf;
      border-radius: 6px;
      overflow-x: auto;

      & code {
        padding: 0;
        background: none;
        color: inherit;
      }
    }
  }
}

/* ==================== 반응형: 태블릿 ==================== */
@media screen and (max-width: 768px) {
  .post-box {
    padding: 30px 20px;
    margin: 20px auto;

    & .post-header {
      & .post-title {
        font-size: 26px;
      }
    }

    & .post-content {
      font-size: 15px;

      & h2 {
        font-size: 22px;
      }

      & h3 {
        font-size: 18px;
      }
    }
  }
}

/* ==================== 반응형: 모바일 ==================== */
@media screen and (max-width: 480px) {
  .post-box {
    padding: 20px 15px;

    & .post-header {
      & .post-title {
        font-size: 22px;
      }
    }

    & .post-content {
      font-size: 14px;
    }
  }
}
