/* Comic Post Header */
.comic-post-header {
  padding-top: 10px;
  padding-bottom: 40px;
}

/* Post Header Content */
.post-header-content {
  position: relative;
  width: 100%;
  height: 600px;
  overflow: hidden;
}

.post-header-image {
  position: relative;
  width: 100%;
  height: 100%;
}

.post-header-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Overlay */
.post-header-overlay {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.9) 0%,
    rgba(0, 0, 0, 0.7) 50%,
    rgba(0, 0, 0, 0.3) 80%,
    transparent 100%
  );
  padding: 20px;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Breadcrumb */
.breadcrumb {
  font-size: 13px;
  padding-bottom: 10px;
}

.breadcrumb-item {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color 0.3s ease;
}

.breadcrumb-item:hover {
  color: var(--primary-color);
}

.breadcrumb-separator {
  margin: 0 8px;
  color: rgba(255, 255, 255, 0.5);
}

.breadcrumb-current {
  color: rgba(255, 255, 255, 0.85);
}

/* Tags */
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  margin-top: auto;
}

.post-tags .tag {
  background: var(--primary-color);
  color: #fff;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.3s ease;
  letter-spacing: 0.5px;
}

.post-tags .tag:hover {
  background: #c0392b;
}

/* Title */
.post-title-detail {
  font-size: 48px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 15px;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
}

/* Subtitle */
.post-subtitle {
  font-size: 18px;
  line-height: 1.5;
  margin-bottom: 20px;
  font-style: italic;
  opacity: 0.95;
  font-weight: 300;
}

/* Meta */
.post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  opacity: 0.9;
}

.post-author strong {
  font-weight: 600;
}

.post-separator {
  color: rgba(255, 255, 255, 0.5);
}

.post-date {
  color: rgba(255, 255, 255, 0.85);
}

.post-comments {
  color: #fff;
  text-decoration: none;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
  gap: 5px;
}

.post-comments:hover {
  color: var(--primary-color);
}

/* Responsive */
@media (max-width: 820px) {
  .post-header-content {
    height: 500px;
  }

  .post-title {
    font-size: 32px;
  }

  .post-subtitle {
    font-size: 16px;
  }

  .post-meta {
    font-size: 12px;
    flex-wrap: wrap;
  }

  .breadcrumb {
    font-size: 12px;
  }

  .post-title-detail {
    font-size: 32px;
  }
}

@media (max-width: 480px) {
  .post-header-content {
    height: 400px;
  }

  .post-title {
    font-size: 24px;
  }

  .post-subtitle {
    font-size: 14px;
  }

  .post-tags .tag {
    font-size: 10px;
    padding: 4px 10px;
  }

  .post-title-detail {
    font-size: 18px;
  }
}

.comic-post-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
  padding-bottom: 40px;
}

.comic-post-span8 {
  padding-right: 20px;
}

.comic-post-span4 {
  display: flex;
  flex-direction: column;
  gap: 30px;
  align-self: start;
  position: sticky;
  top: 20px;
}

/* Comic Post Main Content */
.post-article {
  padding: 0;
}

/* Post Content */
.post-content {
  line-height: 1.8;
  font-size: 16px;
  color: #fff;
}

.post-content p {
  margin: 20px 0;
}

.post-intro {
  font-size: 18px;
  font-weight: 400;
}

/* Post Figures */
.post-figure {
  text-align: center;
}

.post-figure img {
  width: 100%;
  height: auto;
  display: block;
}

.post-figure figcaption {
  font-size: 14px;
  color: #777;
  font-style: italic;
  margin-top: 10px;
  padding: 0 20px;
}

.post-figure-full {
  width: 100%;
  margin: 20px auto 0;
}

.post-figure-full img {
  border-radius: 0;
  width: 100%;
}

/* Blockquotes */
.post-quote {
  background: #3333;
  border-left: 4px solid var(--primary-color);
  padding: 20px 25px;
  font-size: 16px;
  line-height: 1.7;
  font-style: italic;
}

/* Post Footer */
.post-footer {
  padding-top: 20px;
  border-top: 2px solid #eee;
}

/* Share Buttons */
.post-share {
  display: flex;
  align-items: center;
  gap: 15px;
}

.share-buttons {
  display: flex;
  gap: 10px;
}

.share-btn {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 16px;
}

.share-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.share-btn.facebook {
  background: #3b5998;
}

.share-btn.facebook:hover {
  background: #2d4373;
}

.share-btn.twitter {
  background: #1da1f2;
}

.share-btn.twitter:hover {
  background: #0c85d0;
}

.share-btn.pinterest {
  background: #bd081c;
}

.share-btn.pinterest:hover {
  background: #8c0615;
}

.share-btn.linkedin {
  background: #0077b5;
}

.share-btn.linkedin:hover {
  background: #005582;
}

/* Responsive */
@media (max-width: 820px) {
  .post-content {
    font-size: 15px;
  }

  .post-intro {
    font-size: 17px;
  }

  .post-quote {
    padding: 15px 20px;
    font-size: 15px;
  }

  .post-tags-footer,
  .post-share {
    flex-direction: column;
    align-items: flex-start;
  }

  .share-buttons {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 480px) {
  .post-content {
    font-size: 14px;
  }

  .post-intro {
    font-size: 16px;
  }

  .share-btn {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }
}

/* Sidebar Widget */
.sidebar-widget-post {
  padding: 25px 0 0 20px;
}

.widget-title-post {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 20px 0;
  padding-bottom: 15px;
  border-bottom: 2px solid #fff;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

/* Related Articles Section */
.related-articles-section {
  margin-top: 20px;
}

/* Section Tabs */
.section-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
}

.tab-btn {
  padding: 12px 30px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  position: relative;
  background: #000;
  color: #fff;
}

.tab-btn:hover {
  background: #333;
}

/* Active state - màu xanh cho cả 2 tab */
.tab-btn.active {
  background: var(--primary-color);
}

.tab-btn.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: #fff;
}

/* Tab Content */
.tab-content {
  display: none;
  animation: fadeIn 0.4s ease-in;
}

.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Related Articles Grid */
.related-articles-grid,
.author-articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  margin-bottom: 30px;
}

/* Article Card */
.article-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.article-card-image {
  width: 100%;
  height: 120px;
  overflow: hidden;
  position: relative;
}

.article-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.article-card-title {
  padding-top: 10px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  transition: color 0.3s ease;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.article-card-date {
  padding: 0 20px 20px;
  margin: 0;
  font-size: 13px;
  color: #999;
}

/* View More Button */
.view-more-wrapper {
  text-align: right;
  margin-top: 25px;
}

.view-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.3s ease;
  letter-spacing: 0.5px;
}

.view-more-btn:hover {
  gap: 15px;
}

.view-more-btn i {
  font-size: 12px;
  transition: transform 0.3s ease;
}

.view-more-btn:hover i {
  transform: translateX(3px);
}

/* Author Info Box */
.author-info-box {
  display: flex;
  align-items: flex-start;
  gap: 25px;
  padding-left: 20px;
  border-left: 4px solid #fff;
}

.author-avatar {
  flex-shrink: 0;
}

.author-avatar img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #fff;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.author-details {
  flex: 1;
}

.author-name {
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 5px 0;
}

.author-role {
  font-size: 14px;
  color: var(--primary-color);
  font-weight: 600;
  margin: 0 0 15px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.author-bio {
  font-size: 15px;
  line-height: 1.7;
  color: #fff;
  margin: 0 0 20px 0;
}

.author-social {
  display: flex;
  gap: 12px;
}

.author-social-link {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: #333;
  border-radius: 50%;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.author-social-link:hover {
  background: var(--primary-color);
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Responsive */
@media (max-width: 768px) {
  .section-tabs {
    flex-direction: column;
  }

  .tab-btn {
    width: 100%;
    padding: 15px;
  }

  .article-card-image {
    height: 100px;
  }

  .view-more-wrapper {
    text-align: center;
  }

  .view-more-btn {
    width: 100%;
    justify-content: right;
  }

  .author-info-box {
    flex-direction: column;
    padding: 25px;
  }

  .author-avatar {
    margin: 0 auto 20px;
  }

  .author-details {
    text-align: center;
  }

  .author-social {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .tab-btn {
    font-size: 12px;
    padding: 12px;
  }

  .article-card-title {
    font-size: 15px;
  }

  .article-card-image {
    height: 70px;
  }

  .author-info-box {
    flex-direction: column;
    text-align: center;
    margin: 0;
  }

  .author-social {
    justify-content: center;
  }

  .author-name {
    font-size: 20px;
  }

  .author-bio {
    font-size: 14px;
  }

  .author-info-box {
    border: none;
    padding: 0;
  }

  .author-bio {
    text-align: justify;
  }
}

/* Table of Contents */
.toc-nav {
  font-size: 14px;
}

.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.toc-item {
  margin-bottom: 8px;
}

.toc-link {
  display: block;
  color: #fff;
  text-decoration: none;
  padding: 8px 12px;
  transition: all 0.3s ease;
  line-height: 1.5;
}

.toc-h2 > .toc-link:hover {
  background: #f8f9fa;
  color: var(--primary-color);
  padding-left: 16px;
}

.toc-link.active {
  background: var(--primary-color);
  color: #fff;
  font-weight: 600;
}

/* H2 Level */
.toc-h2 > .toc-link {
  font-weight: 600;
  color: #fff;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

/* H3 Level - Sublist */
.toc-sublist {
  list-style: none;
  margin: 5px 0 0 0;
  padding: 0 0 0 15px;
  border-left: 2px solid #e5e5e5;
}

.toc-h3 {
  margin-bottom: 6px;
}

.toc-h3 > .toc-link {
  font-size: 13px;
  color: #999;
  padding: 6px 10px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.toc-h3 > .toc-link:hover {
  color: var(--primary-color);
  padding-left: 12px;
}

/* H4 Level - Nested Sublist */
.toc-h3 > .toc-sublist {
  padding-left: 15px;
  border-left: 2px solid #f0f0f0;
  margin-top: 5px;
}

.toc-h4 {
  margin-bottom: 5px;
}

.toc-h4 > .toc-link {
  font-size: 12px;
  color: #777;
  padding: 5px 8px;
  font-weight: 400;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.toc-h4 > .toc-link:hover {
  color: var(--primary-color);
  padding-left: 12px;
}

/* Sticky Behavior */
.comic-post-span4 {
  display: flex;
  flex-direction: column;
  gap: 30px;
  align-self: start;
  position: sticky;
  top: 20px;
}

/* Scrollbar for long TOC */
.toc-nav {
  max-height: calc(100vh - 150px);
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 5px;
}

.toc-nav::-webkit-scrollbar {
  width: 5px;
}

.toc-nav::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.toc-nav::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 10px;
}

.toc-nav::-webkit-scrollbar-thumb:hover {
  background: #999;
}

/* Responsive */
@media (max-width: 820px) {
  .comic-post-span4 {
    position: static;
  }

  .sidebar-widget-post {
    margin-bottom: 30px;
  }

  .sidebar-widget-post {
    padding: 20px;
  }

  .widget-title-post {
    font-size: 16px;
  }

  .toc-link {
    font-size: 13px;
    padding: 6px 10px;
  }

  .toc-h3 > .toc-link {
    font-size: 12px;
  }

  .toc-h4 > .toc-link {
    font-size: 11px;
  }
}

@media (max-width: 430px) {
  .comic-post-row {
    grid-template-columns: 1fr;
  }

  .comic-post-span8 {
    padding: 0;
  }

  .comic-post-span4 {
    display: none;
  }
}
