/*
 Theme Name:   GeneratePress Child
 Theme URI:    https://generatepress.com
 Description:  Default GeneratePress child theme
 Author:       Tom Usborne
 Author URI:   https://tomusborne.com
 Template:     generatepress
 Version:      0.1
*/


/* --- Related Posts : Card Box 스타일 --- */
.related-posts-by-category {
  /* 박스화 */
  margin-top: 36px;
  padding: 20px 18px;
  background: #f9fafb;                 /* 은은한 회색 배경 */
  border: 1px solid rgba(0,0,0,.08);    /* 얇은 테두리 */
  border-radius: 14px;                  /* 둥근 모서리 */
  box-shadow: 0 8px 24px rgba(0,0,0,.06); /* 부드러운 그림자 */
}

/* 상단 제목 라인 */
.related-posts-by-category .related-posts-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.3rem;          /* 본문보다 작게 */
  font-weight: 700;
  margin: 0 0 14px;
}

/* 제목 왼쪽에 구분 아이콘 느낌 */
.related-posts-by-category .related-posts-title::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #3b82f6;      /* 파란 점 (테마 링크 컬러와 조화) */
}

/* 카드 그리드 */
.related-posts-by-category .related-posts-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

/* 각 아이템 카드 */
.related-posts-by-category .related-post-item {
  background: #ffffff;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 12px;
  overflow: hidden;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}

.related-posts-by-category .related-post-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0,0,0,.08);
  border-color: rgba(0,0,0,.12);
}

/* 썸네일 */
.related-posts-by-category .related-post-thumb {
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  background-size: cover;
  background-position: center;
  background-color: #f3f4f6; /* 썸네일 없을 때 바탕 */
}

/* 텍스트 영역 */
.related-posts-by-category .related-post-title {
  font-size: 0.92rem;   /* 작고 선명하게 */
  line-height: 1.4;
  margin: 12px 12px 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2; 
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-posts-by-category .related-post-date {
  display: block;
  font-size: 1.1rem;
  color: #6b7280;
  margin: 0 12px 12px;
}

/* 모바일 여백 조정 */
@media (max-width: 640px) {
  .related-posts-by-category {
    padding: 16px 14px;
    border-radius: 12px;
  }
}

/* (선택) 다크모드 대응 */
@media (prefers-color-scheme: dark) {
  .related-posts-by-category {
    background: #0f172a;                 /* slate-900 느낌 */
    border-color: rgba(255,255,255,.08);
    box-shadow: 0 8px 24px rgba(0,0,0,.5);
  }
  .related-posts-by-category .related-post-item {
    background: #111827;                 /* gray-900 */
    border-color: rgba(255,255,255,.06);
  }
  .related-posts-by-category .related-post-title { color: #e5e7eb; }
  .related-posts-by-category .related-post-date  { color: #9ca3af; }
  .related-posts-by-category .related-post-thumb { background-color: #1f2937; }
}

/* ===== 아카이브/홈 카드형: [썸네일 | 텍스트] ===== */
/* 핵심: 그리드는 article이 아니라 .inside-article에 건다 */
.blog .site-main .inside-article,
.archive .site-main .inside-article {
  display: grid !important;
  grid-template-columns: 300px 1fr;                     /* 왼쪽 썸네일 고정폭 */
  grid-template-areas:
    "thumb header"
    "thumb excerpt";
  gap: 18px 24px;
  align-items: start;
  padding: 18px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 6px 18px rgba(0,0,0,.04);
}

/* 그리드 영역 매핑 */
.blog .site-main .inside-article .post-image,
.archive .site-main .inside-article .post-image {
  grid-area: thumb;
}
.blog .site-main .inside-article .entry-header,
.archive .site-main .inside-article .entry-header {
  grid-area: header;
  margin: 0;
}
.blog .site-main .inside-article .entry-summary,
.archive .site-main .inside-article .entry-summary,
.blog .site-main .inside-article .entry-content,
.archive .site-main .inside-article .entry-content {
  grid-area: excerpt;
  margin: 0;
  font-size: .95rem;
  line-height: 1.55;
}

/* 썸네일 사이즈/자르기 */
.blog .site-main .inside-article .post-image a { display: block; }
.blog .site-main .inside-article .post-image img,
.archive .site-main .inside-article .post-image img {
  width: 100%;
  height: 200px;            /* 필요시 180~220px로 조정 */
  object-fit: cover;
  border-radius: 10px;
  display: block;
}

/* 제목/메타 */
.blog .site-main .inside-article .entry-title,
.archive .site-main .inside-article .entry-title {
  font-size: 1.3rem;
  line-height: 1.35;
  margin: 0 0 6px;
}
.blog .site-main .inside-article .entry-meta,
.archive .site-main .inside-article .entry-meta {
  font-size: 1.0rem;
  color: #6b7280;
  margin-bottom: 8px;
}

/* 모바일 1열 스택 */
@media (max-width: 768px) {
  .blog .site-main .inside-article,
  .archive .site-main .inside-article {
    grid-template-columns: 1fr;
    grid-template-areas:
      "thumb"
      "header"
      "excerpt";
    padding: 12px;
    border-radius: 12px;
  }
}
/* 아카이브/홈 글 제목 진하게 */
.blog .site-main .inside-article .entry-title a,
.archive .site-main .inside-article .entry-title a {
  font-weight: 700;   /* Bold */
  color: #111827;     /* 글씨색 진하게 (원하는 색으로) */
  text-decoration: none; /* 밑줄 제거 (원하면) */
}

/* 마우스 오버 시 강조 */
.blog .site-main .inside-article .entry-title a:hover,
.archive .site-main .inside-article .entry-title a:hover {
  color: #1d4ed8;     /* hover 색 (테마 파랑 계열) */
}


