/* ===========================
   Review Board - SEO 후기게시판 스타일
   =========================== */

/* --- 카드형 목록 --- */
.review-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 0;
}

.review-card {
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  transition: box-shadow 0.2s, transform 0.2s;
}

.review-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  transform: translateY(-2px);
}

.review-card a {
  display: block;
  text-decoration: none;
  color: inherit;
}

.review-card__thumb {
  position: relative;
  width: 100%;
  padding-top: 100%;
  overflow: hidden;
  background: #f5f5f5;
}

.review-card__thumb img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.review-card__info {
  padding: 14px 16px;
}

.review-card__category {
  display: inline-block;
  font-size: 12px;
  color: #602d7c;
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.review-card__title {
  font-size: 15px;
  font-weight: 500;
  color: #222;
  line-height: 1.4;
  margin: 0 0 8px 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-card__date {
  font-size: 13px;
  color: #999;
}

/* --- 카테고리 필터 --- */
.review-category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 30px;
  justify-content: center;
}

.review-category-filter a {
  display: inline-block;
  padding: 8px 20px;
  border: 1px solid #ddd;
  border-radius: 24px;
  font-size: 14px;
  color: #666;
  text-decoration: none;
  transition: all 0.2s;
}

.review-category-filter a:hover,
.review-category-filter a.active {
  background: #602d7c;
  border-color: #602d7c;
  color: #fff;
}

/* --- 상세 뷰 --- */
.review-detail {
  max-width: 800px;
  margin: 0 auto;
}

.review-breadcrumb {
  font-size: 13px;
  color: #999;
  margin-bottom: 20px;
}

.review-breadcrumb a {
  color: #999;
  text-decoration: none;
}

.review-breadcrumb a:hover {
  color: #602d7c;
}

.review-breadcrumb span {
  margin: 0 6px;
}

.review-header {
  border-bottom: 2px solid #333;
  padding-bottom: 16px;
  margin-bottom: 30px;
}

.review-header h1 {
  font-size: 24px;
  font-weight: 600;
  color: #222;
  margin: 0 0 12px 0;
  line-height: 1.4;
}

.review-meta {
  display: flex;
  gap: 16px;
  font-size: 14px;
  color: #999;
}

.review-images {
  margin-bottom: 40px;
}

.review-images figure {
  margin: 0 0 16px 0;
}

.review-images img {
  width: 100%;
  border-radius: 4px;
}

.review-content {
  line-height: 1.8;
  font-size: 16px;
  color: #333;
  margin-bottom: 40px;
  word-break: keep-all;
}

.review-content .qa-item {
  margin-bottom: 24px;
}

.review-content .qa-q {
  font-weight: 600;
  color: #602d7c;
  margin-bottom: 8px;
  font-size: 16px;
}

.review-content .qa-a {
  color: #444;
  padding-left: 16px;
  border-left: 3px solid #e8dff0;
}

/* --- 목록/수정/삭제 버튼 --- */
.review-actions {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid #eee;
  padding-top: 20px;
  margin-bottom: 40px;
}

.review-actions a,
.review-actions input[type="submit"] {
  display: inline-block;
  padding: 10px 24px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  color: #666;
  text-decoration: none;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s;
}

.review-actions a:hover,
.review-actions input[type="submit"]:hover {
  border-color: #602d7c;
  color: #602d7c;
}

.review-actions .btn-delete {
  color: #e74c3c;
  border-color: #e74c3c;
}

/* --- 댓글 --- */
.review-comments {
  border-top: 2px solid #333;
  padding-top: 20px;
}

.review-comments .comment-header {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
}

.review-comments .comment-item {
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}

.review-comments .comment-item strong {
  color: #333;
  margin-right: 8px;
}

.review-comments .comment-form textarea {
  width: 100%;
  min-height: 80px;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 12px;
  font-size: 14px;
  resize: vertical;
  box-sizing: border-box;
}

.review-comments .comment-form .comment-submit {
  margin-top: 8px;
  text-align: right;
}

/* --- 페이징 --- */
.review-paging {
  text-align: center;
  margin: 40px 0;
}

.review-paging a,
.review-paging strong {
  display: inline-block;
  min-width: 36px;
  height: 36px;
  line-height: 36px;
  text-align: center;
  margin: 0 2px;
  font-size: 14px;
  color: #666;
  text-decoration: none;
  border-radius: 4px;
}

.review-paging strong,
.review-paging a:hover {
  background: #602d7c;
  color: #fff;
}

/* --- 글쓰기 폼 --- */
.review-write table {
  width: 100%;
  border-collapse: collapse;
}

.review-write th {
  width: 15%;
  padding: 12px 16px;
  text-align: left;
  font-weight: 500;
  font-size: 14px;
  color: #333;
  background: #fafafa;
  border: 1px solid #eee;
}

.review-write td {
  padding: 12px 16px;
  border: 1px solid #eee;
}

.review-write input[type="text"],
.review-write textarea,
.review-write select {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  box-sizing: border-box;
}

.review-write .seo-field {
  background: #f8f6fb;
  border-color: #e0d6eb;
}

.review-write .seo-hint {
  font-size: 12px;
  color: #999;
  margin-top: 4px;
}

/* --- Q&A 에디터 --- */
.qa-editor {
  margin-top: 20px;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 20px;
  background: #fafafa;
}

.qa-editor__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.qa-editor__header h3 {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin: 0;
}

.qa-btn-add {
  padding: 8px 16px;
  background: #602d7c;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
}

.qa-btn-add:hover {
  background: #4a2260;
}

.qa-pair {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 12px;
  position: relative;
}

.qa-pair__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.qa-pair__num {
  font-size: 14px;
  font-weight: 700;
  color: #602d7c;
}

.qa-btn-remove {
  padding: 4px 12px;
  background: #fff;
  color: #e74c3c;
  border: 1px solid #e74c3c;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
}

.qa-btn-remove:hover {
  background: #e74c3c;
  color: #fff;
}

.qa-pair__field {
  margin-bottom: 10px;
}

.qa-pair__field:last-child {
  margin-bottom: 0;
}

.qa-pair__field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #666;
  margin-bottom: 4px;
}

.qa-input-q {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #602d7c;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 500;
  box-sizing: border-box;
  background: #f8f6fb;
}

.qa-input-a {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  box-sizing: border-box;
  resize: vertical;
  min-height: 80px;
  line-height: 1.6;
}

.qa-input-q:focus,
.qa-input-a:focus {
  outline: none;
  border-color: #602d7c;
  box-shadow: 0 0 0 2px rgba(96,45,124,0.1);
}

/* --- 반응형 --- */
@media (max-width: 1024px) {
  .review-list {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}

@media (max-width: 768px) {
  .review-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .review-card__info {
    padding: 10px 12px;
  }

  .review-card__title {
    font-size: 14px;
  }

  .review-card__category {
    font-size: 11px;
  }

  .review-header h1 {
    font-size: 20px;
  }

  .review-content {
    font-size: 15px;
  }

  .review-actions {
    flex-direction: column;
    gap: 8px;
  }

  .review-actions a {
    text-align: center;
  }

  .review-category-filter a {
    padding: 6px 14px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .review-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .review-card__info {
    padding: 8px 10px;
  }

  .review-card__title {
    font-size: 13px;
  }

  .review-card__date {
    font-size: 12px;
  }
}
