/* ============================================
   Article Detail Page
   ============================================ */

/* Breadcrumb */
.article-breadcrumb {
  padding: 20px 0;
  background: var(--white);
  border-bottom: 1px solid var(--gray-100);
}

.breadcrumb-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--gray-400);
}

.breadcrumb-nav a {
  color: var(--gray-500);
  text-decoration: none;
  transition: color 0.2s;
}

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

.breadcrumb-nav svg {
  width: 14px;
  height: 14px;
}

.breadcrumb-nav span {
  color: var(--navy);
  font-weight: 600;
}

/* Article Hero */
.article-hero-section {
  padding: 48px 0 32px;
  background: var(--white);
}

.article-hero-inner {
  max-width: 820px;
}

.article-category-badge {
  display: inline-block;
  padding: 5px 16px;
  background: rgba(11,46,89,0.08);
  color: var(--navy);
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 20px;
  margin-bottom: 16px;
}

.article-hero-inner h1 {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.35;
  margin-bottom: 16px;
  white-space: nowrap;
}

.article-hero-excerpt {
  font-size: 1.05rem;
  color: var(--gray-600);
  line-height: 1.65;
  margin-bottom: 28px;
}

.article-hero-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.article-author-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gray-100);
}

.author-name {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--navy);
}

.author-role {
  display: block;
  font-size: 0.76rem;
  color: var(--gray-400);
}

.article-meta-stats {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 0.82rem;
  color: var(--gray-400);
}

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

.article-meta-stats svg {
  width: 15px;
  height: 15px;
}

/* Article page layout */
.article-page-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 48px;
  align-items: start;
}

.article-main {
  min-width: 0;
}

.article-sidebar {
  align-self: start;
}

/* Cover Image */
.article-cover-section {
  padding: 0 0 48px;
  background: var(--white);
}

.article-cover-img {
  border-radius: 16px;
  overflow: hidden;
  max-height: 480px;
}

.article-cover-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.article-cover-meta {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-top: 16px;
}

.article-cover-meta .article-meta-stats {
  justify-content: flex-start;
}

/* Content Layout */
.article-content-section {
  padding: 0 0 80px;
  background: var(--white);
}

.article-body {
  display: flex;
  flex-direction: column;
}

/* Table of Contents */
.article-toc {
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
  border-radius: 12px;
  padding: 24px 28px;
  margin-bottom: 36px;
}

.article-toc h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 14px;
}

.article-toc h4 svg {
  width: 18px;
  height: 18px;
}

.article-toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: toc;
}

.article-toc ol li {
  counter-increment: toc;
  margin-bottom: 8px;
}

.article-toc ol li:last-child {
  margin-bottom: 0;
}

.article-toc ol li a {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.86rem;
  color: var(--gray-600);
  text-decoration: none;
  padding: 6px 8px;
  border-radius: 6px;
  transition: all 0.2s;
}

.article-toc ol li a::before {
  content: counter(toc);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: var(--navy);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 6px;
  flex-shrink: 0;
}

.article-toc ol li a:hover {
  background: var(--white);
  color: var(--navy);
  font-weight: 600;
}

/* Article Content Body */
.article-content-body h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--navy);
  margin: 40px 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--gray-100);
}

.article-content-body h2:first-child {
  margin-top: 0;
}

.article-content-body p {
  font-size: 0.95rem;
  color: #333;
  line-height: 1.85;
  margin-bottom: 16px;
}

.article-content-body ul,
.article-content-body ol {
  padding-left: 20px;
  margin-bottom: 20px;
}

.article-content-body li {
  font-size: 0.93rem;
  color: #333;
  line-height: 1.8;
  margin-bottom: 10px;
}

.article-content-body strong {
  color: var(--navy);
}

.article-content-img {
  width: 100%;
  border-radius: 12px;
  margin: 24px 0 8px;
}

.img-caption {
  font-size: 0.8rem;
  color: var(--gray-400);
  text-align: center;
  margin-bottom: 24px;
}

/* Highlight Box */
.article-highlight-box {
  display: flex;
  gap: 16px;
  padding: 20px 24px;
  background: rgba(11,46,89,0.04);
  border-left: 4px solid var(--navy);
  border-radius: 0 10px 10px 0;
  margin: 24px 0;
}

.article-highlight-box.article-highlight-warning {
  background: rgba(200,155,60,0.08);
  border-left-color: var(--gold);
}

.highlight-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
}

.article-highlight-warning .highlight-icon {
  background: var(--gold);
}

.highlight-icon svg {
  width: 18px;
  height: 18px;
  color: var(--white);
  stroke: var(--white);
}

.article-highlight-box strong {
  display: block;
  font-size: 0.88rem;
  color: var(--navy);
  margin-bottom: 4px;
}

.article-highlight-box p {
  font-size: 0.86rem;
  margin-bottom: 0;
}

/* Tags & Share */
.article-tags-share {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 28px 0;
  margin-top: 40px;
  border-top: 1px solid var(--gray-100);
}

.article-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}

.tag-label {
  font-size: 0.82rem;
  color: var(--gray-400);
  font-weight: 600;
  flex-shrink: 0;
}

/* Override articles.css card overlay .article-tag (position:absolute) */
.article-tags-share .article-tag {
  position: static;
  top: auto;
  left: auto;
  display: inline-flex;
  align-items: center;
  padding: 5px 14px;
  background: var(--gray-50);
  color: var(--navy);
  font-size: 0.78rem;
  font-weight: 500;
  border-radius: 20px;
  border: 1px solid var(--gray-200);
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  letter-spacing: 0;
}

.tag-empty {
  font-size: 0.78rem;
  color: var(--gray-400);
}


.article-tag {
  display: inline-block;
  padding: 4px 14px;
  background: var(--gray-50);
  color: var(--navy);
  font-size: 0.78rem;
  font-weight: 500;
  border-radius: 20px;
  border: 1px solid var(--gray-200);
  text-decoration: none;
  transition: all 0.2s;
}

.article-tag:hover {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

.article-share-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  margin-left: auto;
  width: auto;
  height: auto;
  padding: 0;
  border: none;
  background: transparent;
  border-radius: 0;
}

.share-label {
  font-size: 0.82rem;
  color: var(--gray-400);
  font-weight: 600;
  white-space: nowrap;
  line-height: 1;
}

.share-btn-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.share-btn {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  width: 36px;
  height: 36px;
  min-width: 36px;
  margin: 0;
  padding: 0;
  border-radius: 50%;
  border: none;
  color: var(--white);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  flex-shrink: 0;
}

.share-btn-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: block;
  pointer-events: none;
}

.share-btn-icon--fill {
  fill: currentColor;
  stroke: none !important;
}

.share-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  pointer-events: none;
}

.share-btn svg:not(.share-btn-icon--fill) {
  stroke: currentColor;
  fill: none;
}

.share-btn--facebook {
  background: #1877f2;
}

.share-btn--facebook:hover {
  background: #1468d9;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(24, 119, 242, 0.35);
}

.share-btn--line {
  background: #06c755;
}

.share-btn--line:hover {
  background: #05a847;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(6, 199, 85, 0.35);
}

.share-btn--copy {
  background: #64748b;
}

.share-btn--copy:hover {
  background: #475569;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(100, 116, 139, 0.35);
}

.share-btn--copy.is-copied {
  background: #16a34a;
}

.share-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 20px;
  background: var(--navy);
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(11, 46, 89, 0.25);
  z-index: 200;
  animation: shareToastIn 0.25s ease;
}

.share-toast[hidden] {
  display: none;
}

@keyframes shareToastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(8px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Author Box */
.article-author-box {
  display: flex;
  gap: 20px;
  padding: 28px;
  background: var(--gray-50);
  border-radius: 14px;
  margin: 32px 0;
  border: 1px solid var(--gray-100);
}

.author-box-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 3px solid var(--white);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.author-box-info h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
}

.author-box-role {
  font-size: 0.8rem;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 8px;
}

.author-box-bio {
  font-size: 0.84rem;
  color: var(--gray-600);
  line-height: 1.6;
  margin-bottom: 12px;
}

.author-box-contact {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: var(--navy);
  color: var(--white);
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s;
}

.author-box-contact svg {
  width: 15px;
  height: 15px;
}

.author-box-contact:hover {
  background: var(--gold);
}

/* Prev / Next */
.article-prev-next {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 32px;
}

.article-pn-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.2s;
}

.article-pn-link:hover {
  border-color: var(--navy);
  background: rgba(11,46,89,0.02);
}

.article-pn-next {
  justify-content: flex-end;
}

.article-pn-next .pn-text {
  text-align: right;
}

.pn-img {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.pn-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.pn-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--gray-400);
  font-weight: 500;
}

.pn-label svg {
  width: 13px;
  height: 13px;
}

.pn-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--gold);
}

.pn-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.35;
}

/* ========== SIDEBAR ========== */
.sidebar-sticky {
  position: sticky;
  top: 84px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Sidebar CTA */
.sidebar-cta-card {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: 0 0 14px 14px;
  padding: 28px 24px;
  color: var(--navy);
}

.sidebar-cta-card h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--navy);
}

.sidebar-cta-card p {
  font-size: 0.84rem;
  color: var(--gray-600);
  line-height: 1.55;
  margin-bottom: 18px;
}

.sidebar-cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  background: var(--gold);
  color: var(--white);
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.2s;
  margin-bottom: 10px;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.sidebar-cta-btn svg {
  width: 16px;
  height: 16px;
}

.sidebar-cta-btn:hover {
  background: #d4a73f;
  transform: translateY(-1px);
}

.sidebar-cta-phone {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px;
  background: var(--gray-50);
  color: var(--navy);
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.2s;
  border: 1px solid var(--gray-200);
}

.sidebar-cta-phone svg {
  width: 15px;
  height: 15px;
}

.sidebar-cta-phone:hover {
  background: var(--gray-100);
}

/* Sidebar Recommended */
.sidebar-recommended {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: 14px;
  padding: 24px;
}

.sidebar-recommended h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--gray-100);
}

.sidebar-article-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sidebar-article-item {
  display: flex;
  gap: 12px;
  padding: 10px;
  border-radius: 10px;
  text-decoration: none;
  transition: background 0.2s;
}

.sidebar-article-item:hover {
  background: var(--gray-50);
}

.sidebar-article-item img {
  width: 72px;
  height: 54px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.sidebar-article-item h5 {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.4;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sidebar-article-item span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  color: var(--gray-400);
}

.sidebar-article-item span svg {
  width: 12px;
  height: 12px;
}

/* ========== Responsive ========== */
@media (max-width: 1024px) {
  .article-page-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .sidebar-sticky {
    position: static;
  }

  .article-hero-inner h1 {
    font-size: 1.8rem;
  }
}

@media (max-width: 768px) {
  .article-hero-section {
    padding: 32px 0 24px;
  }

  .article-hero-inner h1 {
    font-size: 1.5rem;
  }

  .article-hero-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .article-content-body h2 {
    font-size: 1.2rem;
  }

  .article-author-box {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .article-prev-next {
    grid-template-columns: 1fr;
  }

  .article-pn-next {
    text-align: left;
  }

  .article-tags-share {
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
  }

  .article-share-bar {
    margin-left: 0;
    justify-content: flex-start;
    width: 100%;
  }

  .share-btn-group {
    gap: 8px;
  }

  .article-cover-img {
    border-radius: 10px;
    max-height: 300px;
  }
}
