/* K-Beauty Hunters Custom Styles */

:root {
  --primary-color: #ff6b6b;
  --secondary-color: #4ecdc4;
  --accent-color: #ffe66d;
  --text-dark: #1f2937;  /* 더 진한 색상으로 대비 개선 */
  --text-light: #4b5563;  /* 밝은 텍스트도 대비 개선 */
  --text-muted: #6b7280;  /* 중간 톤 */
  --bg-light: #f3f4f6;
  --bg-footer: #e5e7eb;  /* footer 배경색 */
  --border-color: #d1d5db;
}

/* 접근성을 위한 추가 색상 클래스 */
.text-accessible-gray {
  color: #4b5563;  /* WCAG AA 기준 충족 */
}

.bg-accessible-light {
  background-color: #f3f4f6;
}

/* 한글 폰트 최적화 */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", "Malgun Gothic", sans-serif;
  line-height: 1.8;
  color: var(--text-dark);
}

/* 헤더 스타일 개선 */
.site-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* 저자 정보 카드 */
.author-bio {
  background: var(--bg-light);
  border-left: 4px solid var(--primary-color);
  transition: transform 0.3s ease;
}

.author-bio:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* 카테고리별 색상 */
.category-성분분석 {
  border-color: #6c5ce7;
  color: #6c5ce7;
}

.category-피부과전문 {
  border-color: #00b894;
  color: #00b894;
}

.category-화학분석 {
  border-color: #fdcb6e;
  color: #fdcb6e;
}

.category-트렌드리포트 {
  border-color: #e17055;
  color: #e17055;
}

.category-제품리뷰 {
  border-color: #74b9ff;
  color: #74b9ff;
}

/* 포스트 카드 스타일 */
.post-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.post-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.post-card-content {
  padding: 1.5rem;
}

.post-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
  line-height: 1.4;
}

.post-card-excerpt {
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.post-card-meta {
  display: flex;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-light);
}

/* 성분 분석 박스 */
.ingredient-analysis {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 12px;
  padding: 2rem;
  margin: 2rem 0;
}

.ingredient-analysis h3 {
  color: white;
  margin-bottom: 1.5rem;
}

.ingredient-analysis .bg-white {
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* 임상 데이터 박스 */
.clinical-data {
  border: 2px solid #00b894;
  border-radius: 12px;
  position: relative;
  margin: 2rem 0;
}

.clinical-data::before {
  content: "✓ 검증됨";
  position: absolute;
  top: -12px;
  right: 20px;
  background: white;
  padding: 0 10px;
  color: #00b894;
  font-weight: bold;
  font-size: 0.85rem;
}

/* 제품 정보 테이블 */
.product-info table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
}

.product-info table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
}

.product-info table tr:last-child td {
  border-bottom: none;
}

.product-info table td:first-child {
  background: var(--bg-light);
  font-weight: 600;
  width: 30%;
}

/* 태그 스타일 */
.tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  margin: 0.25rem;
  background: var(--bg-light);
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--text-dark);
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.tag:hover {
  border-color: var(--primary-color);
  background: white;
  transform: translateY(-2px);
}

/* 평점 표시 */
.rating {
  display: inline-flex;
  align-items: center;
  color: #ffd700;
}

.rating .star {
  margin-right: 2px;
  font-size: 1.2rem;
}

.rating .star.filled {
  color: #ffd700;
}

.rating .star.empty {
  color: #ddd;
}

/* 목차 스타일 */
#TableOfContents {
  background: white;
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

#TableOfContents ul {
  list-style: none;
  padding-left: 1.5rem;
}

#TableOfContents > ul {
  padding-left: 0;
}

#TableOfContents li {
  margin: 0.5rem 0;
}

#TableOfContents a {
  color: var(--text-dark);
  text-decoration: none;
  transition: color 0.2s ease;
}

#TableOfContents a:hover {
  color: var(--primary-color);
}

/* 반응형 이미지 */
article img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1.5rem 0;
}

/* 인용문 스타일 */
blockquote {
  border-left: 4px solid var(--primary-color);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: var(--text-light);
  background: var(--bg-light);
  padding: 1.5rem;
  border-radius: 0 8px 8px 0;
}

/* 코드 블록 스타일 */
pre {
  background: #2d3436;
  color: #dfe6e9;
  padding: 1.5rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1.5rem 0;
}

code {
  background: var(--bg-light);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-size: 0.9rem;
  color: var(--primary-color);
}

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

/* 테이블 스타일 */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

table th {
  background: var(--bg-light);
  padding: 0.75rem;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid var(--border-color);
}

table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

table tr:hover {
  background: var(--bg-light);
}

/* 모바일 반응형 */
@media (max-width: 768px) {
  .post-card {
    margin-bottom: 1rem;
  }
  
  .author-bio {
    padding: 1rem;
  }
  
  .product-info table td {
    display: block;
    width: 100% !important;
  }
  
  .product-info table td:first-child {
    border-bottom: none;
    font-weight: bold;
    padding-bottom: 0.25rem;
  }
  
  .product-info table td:last-child {
    padding-top: 0.25rem;
    padding-bottom: 1rem;
  }
}

/* 애니메이션 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fadeInUp {
  animation: fadeInUp 0.6s ease-out;
}

/* 그라디언트 텍스트 */
.gradient-text {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-fill-color: transparent;
}

/* 버튼 스타일 */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background: #ff5252;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

.btn-secondary {
  background: white;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
  background: var(--primary-color);
  color: white;
}