/* Comic-Style News Detail Page */
.manga-panel {
  background-color: white;
  border: 4px solid var(--manga-border-color);
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.4);
  padding: 20px;
  margin-bottom: 25px;
  position: relative;
  overflow: hidden;
}

/* News Detail Container */
.news-detail-container {
  background: white;
  padding: 20px;
  border-radius: 12px;
  position: relative;
  margin-bottom: 30px;
}

/* Category Badge */
.news-category-badge {
  display: inline-block;
  padding: 5px 15px;
  border-radius: 12px;
  color: white;
  font-size: 0.9rem;
  font-weight: bold;
  margin-bottom: 15px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.2);
}

/* Title Styling */
.news-detail-title {
  font-size: 2rem;
  margin-bottom: 15px;
  color: var(--dark-color);
  line-height: 1.3;
}

/* Meta Information */
.news-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 20px;
  color: #777;
  font-size: 0.9rem;
  border-bottom: 2px dashed #eee;
  padding-bottom: 15px;
}

.news-category,
.news-date {
  display: flex;
  align-items: center;
}

.news-category i,
.news-date i {
  margin-right: 5px;
  color: var(--primary-color);
}

/* Featured Image with Comic Frame */
.news-detail-image {
  margin-bottom: 25px;
  text-align: center;
  border: 3px solid var(--manga-border-color);
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
  border-radius: 12px;
}

.news-detail-image img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* Content Styling with Better Text Formatting */
.news-detail-content {
  line-height: 1.7;
  font-size: 1.1rem;
  color: #333;
  margin-bottom: 30px;
}

.news-detail-content p {
  margin-bottom: 20px;
}

.news-detail-content h1,
.news-detail-content h2,
.news-detail-content h3,
.news-detail-content h4,
.news-detail-content h5,
.news-detail-content h6 {
  margin-top: 25px;
  margin-bottom: 15px;
  color: var(--dark-color);
}

.news-detail-content ul,
.news-detail-content ol {
  margin-bottom: 20px;
  padding-left: 25px;
}

.news-detail-content li {
  margin-bottom: 8px;
}

.news-detail-content a {
  color: var(--primary-color);
  text-decoration: none;
}

.news-detail-content a:hover {
  text-decoration: underline;
}

.news-detail-content blockquote {
  margin: 20px 0;
  padding: 15px 20px;
  border-left: 4px solid var(--primary-color);
  background-color: #f9f9f9;
  font-style: italic;
}

/* Content Images Styling */
.content-image-wrapper {
  margin: 25px 0;
  position: relative;
  text-align: center;
}

.content-image-wrapper img {
  max-width: 100%;
  border: 3px solid var(--manga-border-color);
  border-radius: 12px;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.2);
}

/* Iframe wrapper for responsive videos */
.iframe-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
  margin: 25px 0;
}

.iframe-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 3px solid var(--manga-border-color);
  border-radius: 12px;
}

/* Social Share Buttons */
.social-share {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 2px dashed #eee;
  display: flex;
  align-items: center;
}

.social-share span {
  margin-right: 15px;
  font-weight: bold;
  color: #555;
}

.social-share a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-right: 10px;
  text-decoration: none;
  transition: all 0.3s;
  border: 2px solid;
}

.share-facebook {
  background-color: #3b5998;
  color: white;
  border-color: #2d4373;
}

.share-twitter {
  background-color: #1da1f2;
  color: white;
  border-color: #0c85d0;
}

.social-share a:hover {
  transform: translateY(-3px);
  box-shadow: 2px 5px 10px rgba(0, 0, 0, 0.2);
}

/* Related News Section */
.related-news {
  margin-top: 40px;
  padding: 20px;
  background-color: #f9f9f9;
  border-radius: 12px;
  border: 3px solid var(--manga-border-color);
}

.related-news-title {
  font-size: 1.5rem;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--primary-color);
  color: var(--dark-color);
  position: relative;
}

.related-news-title:after {
  content: "★";
  position: absolute;
  right: 0;
  top: 0;
  color: var(--primary-color);
}

.related-news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.related-news-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.2);
  transition: all 0.3s;
}

.related-news-card:hover {
  transform: translateY(-5px);
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.3);
}

.related-news-card a {
  text-decoration: none;
  color: var(--dark-color);
  display: block;
}

.related-news-image {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  border-bottom: 2px solid var(--manga-border-color);
}

.related-news-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.related-news-card:hover .related-news-image img {
  transform: scale(1.05);
}

.related-news-info {
  padding: 12px;
}

.related-news-info h4 {
  margin: 0 0 8px;
  font-size: 1rem;
  line-height: 1.4;
  color: var(--dark-color);
}

.related-news-date {
  color: #777;
  font-size: 0.8rem;
  display: block;
}

/* Comic-style Back Button */
.back-button-container {
  margin-top: 30px;
  text-align: center;
}

.back-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  background-color: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: 12px;
  transition: all 0.3s;
  font-weight: bold;
  border: 2px solid var(--dark-color);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.3);
}

.back-button i {
  margin-right: 8px;
}

.back-button:hover {
  background-color: var(--dark-color);
  transform: translateY(-3px);
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.4);
}

.back-button:active {
  transform: translateY(-1px);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
}

/* Mobile Responsive Adjustments */
@media (max-width: 992px) {
  .related-news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .manga-panel {
    padding: 15px;
  }

  .news-detail-title {
    font-size: 1.5rem;
  }

  .related-news-grid {
    grid-template-columns: 1fr;
  }

  .social-share {
    flex-wrap: wrap;
  }

  .social-share span {
    margin-bottom: 10px;
    width: 100%;
  }

  .news-detail-content {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .news-detail-title {
    font-size: 1.3rem;
  }

  .manga-panel {
    padding: 10px;
    box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.3);
  }

  .news-meta {
    flex-direction: column;
    gap: 5px;
  }

  .news-detail-content {
    font-size: 0.95rem;
  }

  .back-button {
    width: 100%;
    padding: 12px;
  }

  .news-detail-container {
    padding: 15px 10px;
  }

  .content-image-wrapper img {
    border-width: 2px;
  }
}
