/* News Detail Page Styles */
.news-detail-main {
  min-height: calc(100vh - 200px);
  padding: 40px 0;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.breadcrumb a:hover {
  color: var(--primary-color);
}

.breadcrumb i {
  font-size: 12px;
  color: var(--text-muted);
}

.breadcrumb span {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
}

/* Content Layout */
.content-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  align-items: start;
}

/* News Detail */
.news-detail {
  background: white;
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  overflow-x: hidden;
  max-width: 100%;
}

.news-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 2px solid var(--border-light);
}

.featured-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 16px;
}

.news-category-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 20px;
  background: var(--primary-accent);
  color: var(--primary-color);
}

.news-category-badge.category-industry,
.news-category-badge.category-tips,
.news-category-badge.category-law,
.news-category-badge.category-general {
  background: var(--primary-accent);
  color: var(--primary-color);
}

.news-detail-title {
  font-size: 36px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.news-detail-meta {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
}

.meta-item i {
  font-size: 16px;
}

.news-detail-thumbnail {
  width: 100%;
  height: 400px;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 40px;
  background: var(--gray-100);
}

.news-detail-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-detail-content {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-primary);
  margin-bottom: 48px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.news-detail-content p {
  margin-bottom: 24px;
}

/* 컨텐츠 내부 이미지 스타일 */
.news-detail-content img {
  max-width: 100% !important;
  width: auto !important;
  height: auto !important;
  display: block;
  margin: 20px 0;
  border-radius: 8px;
}

/* 컨텐츠 내부 다른 요소들도 박스를 넘어가지 않도록 */
.news-detail-content * {
  max-width: 100% !important;
}

.news-detail-content iframe,
.news-detail-content video {
  max-width: 100% !important;
  height: auto !important;
}

.news-detail-content table {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  display: block !important;
}

.news-actions {
  display: flex;
  gap: 12px;
  padding-top: 32px;
  border-top: 2px solid var(--border-light);
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

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

.btn-list:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background: var(--primary-accent);
}

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

.btn-share:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(var(--brand-color-rgb), 0.3);
}

/* Sidebar */
.news-sidebar {
  position: sticky;
  top: 100px;
}

.sidebar-section {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.sidebar-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-title i {
  color: var(--primary-color);
  font-size: 20px;
}

/* Related News */
.related-news-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.related-news-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.2s ease;
  background: var(--gray-50);
}

.related-news-item:hover {
  background: var(--primary-accent);
  transform: translateX(4px);
}

.related-thumb {
  width: 70px;
  height: 70px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 24px;
}

.related-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.related-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.related-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-date {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Category List */
.category-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.category-link {
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--gray-50);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.category-link::after {
  content: '\F285';
  font-family: 'Bootstrap Icons';
  font-size: 12px;
  opacity: 0;
  transition: all 0.2s ease;
}

.category-link:hover {
  background: var(--primary-accent);
  color: var(--primary-color);
  padding-left: 18px;
}

.category-link:hover::after {
  opacity: 1;
}

/* Sidebar CTA */
.sidebar-cta {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  border-radius: 12px;
  padding: 32px 24px;
  text-align: center;
  color: white;
  box-shadow: 0 8px 24px rgba(var(--brand-color-rgb), 0.3);
}

.cta-icon {
  width: 64px;
  height: 64px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 32px;
}

.cta-title {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 12px;
}

.cta-desc {
  font-size: 14px;
  opacity: 0.9;
  margin-bottom: 24px;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: white;
  color: var(--primary-color);
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  color: var(--primary-color);
}

.cta-btn i {
  transition: transform 0.3s ease;
}

.cta-btn:hover i {
  transform: translateX(4px);
}

/* Responsive */
@media (max-width: 1024px) {
  .content-layout {
    grid-template-columns: 1fr;
  }

  .news-sidebar {
    position: static;
  }
}

@media (max-width: 768px) {
  .news-detail {
    padding: 32px 24px;
  }

  .news-detail-title {
    font-size: 28px;
  }

  .news-detail-thumbnail {
    height: 250px;
  }

  .news-detail-content {
    font-size: 15px;
  }

  .news-actions {
    flex-direction: column;
  }

  .action-btn {
    width: 100%;
    justify-content: center;
  }
}
