/* ========================================
   Article Page Modern Styles
   ======================================== */

/* Reading Progress Bar */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, #4a90d9, #67b26f);
  z-index: 9999;
  transition: width 0.15s ease;
}

/* Article Hero Banner */
.article-hero {
  position: relative;
  height: auto;
  min-height: 200px;
  overflow: hidden;
  background: #f5f5f5;
}
.article-hero img {
  width: 100%;
  height: auto;
  min-height: 200px;
  object-fit: cover;
  transition: opacity 0.3s;
  display: block;
}
.article-hero .hero-text {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px 30px 30px;
  background: linear-gradient(transparent, rgba(0,0,0,0.6));
  color: #fff;
}
.article-hero .hero-text h1 {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 12px;
  line-height: 1.35;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.article-hero .hero-metas {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: rgba(255,255,255,0.85);
}
.article-hero .hero-metas span {
  display: flex;
  align-items: center;
  gap: 4px;
}
.article-hero .hero-metas i { color: #67b26f; }

/* No-image hero fallback */
.article-hero.no-image {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.article-hero.no-image .hero-text {
  text-align: center;
  background: none;
}

/* Article Body Card */
.article-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
  border: none;
  overflow: hidden;
  margin-bottom: 24px;
}

/* Breadcrumb in card */
.article-breadcrumb {
  padding: 14px 28px;
  background: #f8f9fb;
  border-bottom: 1px solid #f0f0f0;
  font-size: 13px;
  margin: 0;
}
.article-breadcrumb li a { color: #555; }
.article-breadcrumb li.active { color: #333; }
.article-breadcrumb li + li:before { color: #ccc; }

/* Article Content */
.article-body {
  padding: 32px 36px;
  font-size: 16px;
  line-height: 1.85;
  color: #333;
}
.article-body p {
  margin-bottom: 18px;
  text-align: justify;
}
.article-body h2,
.article-body h3,
.article-body h4 {
  margin-top: 30px;
  margin-bottom: 14px;
  font-weight: 600;
  color: #1a1a2e;
}
.article-body h2 { font-size: 22px; border-left: 4px solid #4a90d9; padding-left: 12px; }
.article-body h3 { font-size: 19px; }
.article-body ul,
.article-body ol {
  padding-left: 22px;
  margin-bottom: 18px;
}
.article-body li { margin-bottom: 6px; }
.article-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 20px 0;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.article-body blockquote {
  border-left: 4px solid #67b26f;
  padding: 14px 20px;
  margin: 20px 0;
  background: #f6fdf6;
  border-radius: 0 8px 8px 0;
  color: #555;
  font-style: italic;
}
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14px;
}
.article-body table th,
.article-body table td {
  padding: 10px 14px;
  border: 1px solid #e8e8e8;
  text-align: left;
}
.article-body table th {
  background: #f5f7fa;
  font-weight: 600;
}

/* Video Player */
.article-video {
  margin: 24px 0;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}
.article-video video {
  width: 100%;
  display: block;
}

/* Tags */
.article-tags {
  padding: 20px 36px 24px;
  border-top: 1px solid #f0f0f0;
}
.article-tags strong { color: #555; font-size: 14px; }
.article-tags .tag-item {
  display: inline-block;
  padding: 4px 14px;
  margin: 3px 4px;
  border-radius: 20px;
  font-size: 13px;
  background: #eef2ff;
  color: #4a90d9;
  text-decoration: none;
  transition: all 0.2s;
}
.article-tags .tag-item:hover {
  background: #4a90d9;
  color: #fff;
  transform: translateY(-1px);
}

/* Related Articles Grid */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  padding: 20px 24px;
}
.related-card {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #eee;
  transition: all 0.25s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}
.related-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
  border-color: transparent;
}
.related-card .card-img {
  height: 120px;
  object-fit: cover;
  width: 100%;
  background: #f0f0f0;
}
.related-card .card-body {
  padding: 12px;
}
.related-card .card-title {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
  color: #333;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Comments */
.comments-section {
  padding: 24px 28px;
}
.comment-item {
  padding: 16px 0;
  border-bottom: 1px solid #f2f2f2;
}
.comment-item:last-child { border-bottom: none; }
.comment-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  float: left;
  margin-right: 12px;
}
.comment-meta {
  font-size: 12px;
  color: #999;
  margin-top: 4px;
}
.comment-text {
  font-size: 14px;
  color: #444;
  line-height: 1.6;
  margin-top: 4px;
}

.comment-form {
  padding: 24px 28px;
  background: #fafbfc;
  border-top: 1px solid #f0f0f0;
}
.comment-form input[type="text"],
.comment-form textarea {
  border-radius: 8px;
  border: 1.5px solid #e0e0e0;
  padding: 10px 14px;
  font-size: 14px;
  transition: border-color 0.2s;
}
.comment-form input[type="text"]:focus,
.comment-form textarea:focus {
  border-color: #4a90d9;
  outline: none;
  box-shadow: 0 0 0 3px rgba(74,144,217,0.1);
}
.comment-form .btn-primary {
  background: linear-gradient(135deg, #4a90d9, #357abd);
  border: none;
  border-radius: 8px;
  padding: 8px 24px;
  font-size: 14px;
}

/* Sidebar Cards */
.sidebar-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  border: none;
  margin-bottom: 20px;
  overflow: hidden;
}

.sidebar-card .card-header-custom {
  padding: 16px 20px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 15px;
  font-weight: 600;
  color: #1a1a2e;
  background: #fff;
  position: relative;
  padding-left: 12px;
}
.sidebar-card .card-header-custom::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 16px;
  background: linear-gradient(180deg, #4a90d9, #67b26f);
  border-radius: 2px;
}
.sidebar-card .card-list a {
  display: block;
  padding: 9px 20px;
  color: #444;
  font-size: 14px;
  border-bottom: 1px solid #f8f8f8;
  transition: all 0.2s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-card .card-list a:last-child {
  border-bottom: none;
}
.sidebar-card .card-list a:hover {
  background: #f5f8ff;
  color: #4a90d9;
  padding-left: 24px;
}
.sidebar-card .card-list a::before {
  content: "▸";
  color: #4a90d9;
  margin-right: 8px;
  font-size: 10px;
}

/* DEPRECATED */ .sidebar-card .panel-heading {
  background: #fff;
  padding: 16px 20px;
  border-bottom: 1px solid #f0f0f0;
}
.sidebar-card .panel-heading h3 {
  font-size: 15px;
  font-weight: 600;
  color: #1a1a2e;
  margin: 0;
  position: relative;
  padding-left: 12px;
}
.sidebar-card .panel-heading h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 16px;
  background: linear-gradient(180deg, #4a90d9, #67b26f);
  border-radius: 2px;
}
.sidebar-card .panel-body {
  display: none; /* DEPRECATED */
  padding: 14px 20px;
}
.sidebar-card .list-unstyled li {
  padding: 9px 0;
  border-bottom: 1px solid #f8f8f8;
  font-size: 14px;
}
.sidebar-card .list-unstyled li:last-child { border-bottom: none; }
.sidebar-card .list-unstyled li a {
  color: #444;
  display: block;
  transition: color 0.2s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-card .list-unstyled li a:hover {
  color: #4a90d9;
}
.sidebar-card .list-unstyled li a::before {
  content: "\2022";
  color: #4a90d9;
  margin-right: 8px;
  font-size: 10px;
}

/* Tag Cloud */
.tag-cloud-modern .tag-item-modern {
  display: inline-block;
  padding: 6px 14px;
  margin: 4px;
  border-radius: 20px;
  font-size: 13px;
  background: #f5f7fa;
  color: #555;
  text-decoration: none;
  transition: all 0.2s;
  border: 1px solid #e8e8e8;
}
.tag-cloud-modern .tag-item-modern:nth-child(5n+1) { background: #eef6ff; color: #2b7de9; border-color: #d6eaff; }
.tag-cloud-modern .tag-item-modern:nth-child(5n+2) { background: #eefbf0; color: #27ae60; border-color: #d2f0d9; }
.tag-cloud-modern .tag-item-modern:nth-child(5n+3) { background: #fef6ee; color: #e67e22; border-color: #fee7d3; }
.tag-cloud-modern .tag-item-modern:nth-child(5n+4) { background: #fceef2; color: #e74c3c; border-color: #fdd; }
.tag-cloud-modern .tag-item-modern:nth-child(5n+5) { background: #f3eefc; color: #8e44ad; border-color: #e8d5f5; }
.tag-cloud-modern .tag-item-modern:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
  border-color: #4a90d9;
  color: #4a90d9;
}

/* Footer: only hide old .footer-inner (legacy), site-footer class is fine */
.footer-inner, .footer-inner * {
  display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
  .article-hero { min-height: 180px; height: auto; }
  .article-hero .hero-overlay h1 { font-size: 20px; }
  .article-body { padding: 20px 18px; font-size: 15px; }
  .related-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 14px; }
  .article-tags { padding: 16px 18px; }
  .comments-section { padding: 16px 18px; }
  .comment-form { padding: 16px 18px; }
}



