/* 조회수 강조 */
.meta-item .fa-eye {
  color: var(--brand-primary);
  font-size: 1.1rem;
}

.meta-item:has(.fa-eye) {
  color: var(--text-secondary);
  font-weight: 600;
}

/* 공유 버튼 - 간결한 스타일 */
.social-share {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
}

.share-label {
  font-size: 0.85rem;
  color: #666;
  margin-right: 4px;
}

[data-theme="dark"] .share-label {
  color: #aaa;
}

.share-btn {
  width: 32px;
  height: 32px;
  border: 1px solid #ddd;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.share-btn.facebook {
  background: #3b5998;
  border-color: #3b5998;
  color: white;
}

.share-btn.facebook::after {
  content: 'F';
}

.share-btn.twitter {
  background: #1da1f2;
  border-color: #1da1f2;
  color: white;
}

.share-btn.twitter::after {
  content: 'T';
}

.share-btn.kakao {
  background: #fee500;
  border-color: #fee500;
  color: #3c1e1e;
}

.share-btn.kakao::after {
  content: 'K';
}

.share-btn.copy-link {
  background: #6c757d;
  border-color: #6c757d;
  color: white;
}

.share-btn.copy-link::after {
  content: '📋';
}

.share-btn:hover {
  opacity: 0.8;
}

.share-btn i {
  font-size: 14px;
}

/* FontAwesome 아이콘이 있으면 ::after 숨김 */
.share-btn i + *::after {
  display: none;
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 25px;
}

.tag {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  padding: 5px 12px;
  border-radius: 15px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.article-image {
  margin-bottom: 20px;
  text-align: center;
  aspect-ratio: 1200 / 630;
  width: 100%;
  max-height: 500px;
  overflow: hidden;
  background: var(--bg-tertiary);
  border-radius: 10px;
}

.article-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

/* 히어로 이미지 최적화 */
.article-hero-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-content {
  padding: 50px 40px;
  max-width: 780px;
  margin: 0 auto;
  font-size: 1.125rem;
  line-height: 1.9;
  color: #2d3748;
  letter-spacing: -0.003em;
  word-break: keep-all;
  transition: color 0.3s ease;
}

/* 다크모드 본문 색상 */
[data-theme="dark"] .article-content {
  color: #cbd5e0;
}

/* 첫 문단 드롭캡 (첫 글자 크게) */
.article-content > p:first-of-type::first-letter {
  font-size: 3.8em;
  font-weight: 700;
  line-height: 0.9;
  float: left;
  margin: 0.1em 0.1em 0 0;
  color: #2b6cb0;
  font-family: Georgia, serif;
}

[data-theme="dark"] .article-content > p:first-of-type::first-letter {
  color: #63b3ed;
}

/* 제목 스타일 - 계층 구조 */
.article-content h1 {
  font-size: 2.25rem;
  font-weight: 700;
  margin-top: 2.5em;
  margin-bottom: 0.8em;
  line-height: 1.3;
  color: #1a202c;
  letter-spacing: -0.02em;
  border-bottom: 3px solid #e2e8f0;
  padding-bottom: 0.5em;
}

.article-content h2 {
  font-size: 1.875rem;
  font-weight: 700;
  margin-top: 2.2em;
  margin-bottom: 0.8em;
  line-height: 1.35;
  color: #2d3748;
  letter-spacing: -0.015em;
  position: relative;
  padding-left: 16px;
}

.article-content h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 70%;
  background: linear-gradient(180deg, #3182ce 0%, #2b6cb0 100%);
  border-radius: 2px;
}

.article-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 2em;
  margin-bottom: 0.7em;
  line-height: 1.4;
  color: #2d3748;
  letter-spacing: -0.01em;
}

.article-content h4,
.article-content h5,
.article-content h6 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 1.8em;
  margin-bottom: 0.6em;
  color: #2d3748;
}

/* 다크모드 제목 */
[data-theme="dark"] .article-content h1,
[data-theme="dark"] .article-content h2,
[data-theme="dark"] .article-content h3,
[data-theme="dark"] .article-content h4,
[data-theme="dark"] .article-content h5,
[data-theme="dark"] .article-content h6 {
  color: #f7fafc;
}

[data-theme="dark"] .article-content h1 {
  border-bottom-color: #4a5568;
}

[data-theme="dark"] .article-content h2::before {
  background: linear-gradient(180deg, #63b3ed 0%, #4299e1 100%);
}

/* 단락 */
.article-content p {
  margin-bottom: 1.75em;
  text-align: justify;
}

/* 링크 스타일 */
.article-content a {
  color: #3182ce;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
  font-weight: 500;
}

.article-content a:hover {
  color: #2c5282;
  border-bottom-color: #3182ce;
}

[data-theme="dark"] .article-content a {
  color: #63b3ed;
}

[data-theme="dark"] .article-content a:hover {
  color: #90cdf4;
  border-bottom-color: #63b3ed;
}

/* 강조 텍스트 */
.article-content strong,
.article-content b {
  font-weight: 700;
  color: #1a202c;
}

[data-theme="dark"] .article-content strong,
[data-theme="dark"] .article-content b {
  color: #f7fafc;
}

.article-content em,
.article-content i {
  font-style: italic;
  color: #4a5568;
}

[data-theme="dark"] .article-content em,
[data-theme="dark"] .article-content i {
  color: #a0aec0;
}

/* 하이라이트 */
.article-content mark {
  background: #fef3c7;
  color: #78350f;
  padding: 0.1em 0.3em;
  border-radius: 3px;
}

[data-theme="dark"] .article-content mark {
  background: #744210;
  color: #fef3c7;
}

/* 리스트 스타일 */
.article-content ul,
.article-content ol {
  margin: 1.5em 0;
  padding-left: 2em;
}

.article-content ul li {
  margin-bottom: 0.8em;
  position: relative;
  padding-left: 0.5em;
}

.article-content ul li::marker {
  color: #3182ce;
  font-size: 1.2em;
}

.article-content ol li {
  margin-bottom: 0.8em;
  padding-left: 0.5em;
}

.article-content ol li::marker {
  color: #3182ce;
  font-weight: 600;
}

/* 인용구 - 블로그 스타일 */
.article-content blockquote {
  border-left: 4px solid #3182ce;
  background: #f7fafc;
  padding: 24px 28px;
  margin: 2em 0;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: #4a5568;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  position: relative;
}

.article-content blockquote::before {
  content: '"';
  font-size: 3em;
  font-family: Georgia, serif;
  color: #3182ce;
  opacity: 0.3;
  position: absolute;
  top: 10px;
  left: 10px;
}

.article-content blockquote p {
  margin-bottom: 0.5em;
}

.article-content blockquote p:last-child {
  margin-bottom: 0;
}

[data-theme="dark"] .article-content blockquote {
  background: #2d3748;
  border-left-color: #63b3ed;
  color: #cbd5e0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .article-content blockquote::before {
  color: #63b3ed;
}

/* 이미지 스타일 */
.article-content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 2.5em auto;
  display: block;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background: var(--bg-tertiary);
}

/* 본문 이미지 lazy loading */
.article-content img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.article-content img[loading="lazy"].loaded {
  opacity: 1;
}

.article-content img:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
}

[data-theme="dark"] .article-content img {
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .article-content img:hover {
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
}

/* 코드 블록 */
.article-content code {
  background: #f7fafc;
  color: #e53e3e;
  padding: 0.2em 0.5em;
  border-radius: 4px;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 0.9em;
  border: 1px solid #e2e8f0;
}

[data-theme="dark"] .article-content code {
  background: #2d3748;
  color: #fc8181;
  border-color: #4a5568;
}

.article-content pre {
  background: #1a202c;
  color: #e2e8f0;
  padding: 1.5em;
  border-radius: 8px;
  overflow-x: auto;
  margin: 2em 0;
  line-height: 1.6;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.article-content pre code {
  background: transparent;
  color: inherit;
  padding: 0;
  border: none;
  font-size: 0.95em;
}

/* 구분선 */
.article-content hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, #cbd5e0 50%, transparent);
  margin: 3em 0;
}

[data-theme="dark"] .article-content hr {
  background: linear-gradient(90deg, transparent, #4a5568 50%, transparent);
}

/* 테이블 */
.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 2em 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  overflow: hidden;
}

.article-content table th,
.article-content table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

.article-content table th {
  background: #f7fafc;
  font-weight: 600;
  color: #2d3748;
}

.article-content table tr:hover {
  background: #f7fafc;
}

[data-theme="dark"] .article-content table th {
  background: #2d3748;
  color: #f7fafc;
}

[data-theme="dark"] .article-content table th,
[data-theme="dark"] .article-content table td {
  border-bottom-color: #4a5568;
}

[data-theme="dark"] .article-content table tr:hover {
  background: #2d3748;
}

.article-footer {
  padding: 30px 40px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-tertiary);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.engagement-actions {
  margin-bottom: 30px;
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

/* 뉴스 좋아요 버튼 */
.news-like-btn,
.news-dislike-btn {
  border: 2px solid #ddd;
  background: #fff;
  padding: 12px 24px;
  border-radius: 25px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #666;
}

.news-like-btn:hover {
  border-color: #27ae60;
  background: #f0fff4;
  color: #27ae60;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(39, 174, 96, 0.2);
}

.news-dislike-btn:hover {
  border-color: #e74c3c;
  background: #fff5f5;
  color: #e74c3c;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(231, 76, 60, 0.2);
}

.news-like-btn.active {
  border-color: #27ae60;
  background: #27ae60;
  color: #fff;
}

.news-dislike-btn.active {
  border-color: #e74c3c;
  background: #e74c3c;
  color: #fff;
}

.news-like-btn i,
.news-dislike-btn i {
  font-size: 18px;
}

.related-news h3 {
  margin-bottom: 15px;
  color: var(--text-primary);
  transition: color 0.3s ease;
}

.related-link {
  color: var(--brand-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.related-link:hover {
  text-decoration: underline;
  color: var(--brand-secondary);
}

/* ========================================
   관련 뉴스 섹션 (블로그 스타일)
   ======================================== */
.related-news-section {
  margin-top: 60px;
  padding: 40px;
  background: var(--card-bg);
  border-radius: 16px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
}

.section-header {
  text-align: center;
  margin-bottom: 40px;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 10px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.section-title i {
  color: var(--brand-primary);
  font-size: 1.8rem;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  margin: 0;
}

/* 관련 뉴스 그리드 */
.related-news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.related-news-card {
  background: var(--bg-primary);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--border-color);
  cursor: pointer;
}

.related-news-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px rgba(102, 126, 234, 0.2);
  border-color: var(--brand-primary);
}

.related-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* 썸네일 */
.related-thumbnail {
  position: relative;
  width: 100%;
  height: 180px;
  aspect-ratio: 400 / 250;
  overflow: hidden;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.related-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  background: var(--bg-secondary);
}

.related-news-card:hover .related-thumbnail img {
  transform: scale(1.1);
}

.related-thumbnail-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 100%);
}

.related-placeholder-icon {
  font-size: 3rem;
  color: rgba(255, 255, 255, 0.4);
}

.related-category-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  color: white;
  padding: 5px 12px;
  border-radius: 16px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* 콘텐츠 */
.related-content {
  padding: 20px;
}

.related-title {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 12px 0;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.3s ease;
}

.related-news-card:hover .related-title {
  color: var(--brand-primary);
}

.related-excerpt {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-muted);
  margin: 0 0 16px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.related-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.related-meta i {
  opacity: 0.7;
}

/* 푸터 (더보기 버튼) */
.related-news-footer {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

.btn-view-more {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 100%);
  color: white;
  text-decoration: none;
  border-radius: 30px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-view-more:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
  color: white;
  text-decoration: none;
}

.btn-view-more i:last-child {
  transition: transform 0.3s ease;
}

.btn-view-more:hover i:last-child {
  transform: translateX(4px);
}
