/* Blog detail page specific styles */
.article-header {
  padding: 40px 0;
  text-align: center;
  background: rgb(243 244 246); /* --light-gray fallback */
  background: var(--tw-bg-opacity, 1) rgb(243 244 246 / var(--tw-bg-opacity));
}

.article-header .category {
  color: rgb(225 92 2); /* --primary fallback */
  color: rgb(225 92 2 / var(--tw-text-opacity));
  text-transform: uppercase;
  font-weight: 700;
  font-size: 0.875rem;
  margin-bottom: 16px;
}

.article-header .breadcrumbs-list {
  justify-content: center;
  margin-bottom: 12px;
}

.article-header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  color: rgb(17 24 39); /* --dark fallback */
  color: rgb(17 24 39 / var(--tw-text-opacity));
  line-height: 1.2;
  margin-bottom: 20px;
}

.article-header .author-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: rgb(107 114 128); /* --gray fallback */
  color: rgb(107 114 128 / var(--tw-text-opacity));
  font-size: 0.95rem;
}

.article-header .author-info img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.featured-image {
  width: 100%;
  height: 400px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  margin-bottom: 40px;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px;
  align-items: start;
  padding: 40px 0;
}

.article-content {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  font-size: 1.1rem;
  line-height: 1.7;
  color: rgb(17 24 39); /* --dark fallback */
  color: rgb(17 24 39 / var(--tw-text-opacity));
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
  color: rgb(17 24 39); /* --dark fallback */
  color: rgb(17 24 39 / var(--tw-text-opacity));
  font-weight: 700;
  margin-top: 2em;
  margin-bottom: 1em;
  line-height: 1.3;
}

.article-content h1 { font-size: 2rem; }
.article-content h2 { font-size: 1.75rem; }
.article-content h3 { font-size: 1.5rem; }
.article-content h4 { font-size: 1.25rem; }
.article-content h5 { font-size: 1.125rem; }
.article-content h6 { font-size: 1rem; }

.article-content p {
  margin-bottom: 1.5em;
}

.article-content img,
.article-content pre,
.article-content code,
.article-content table,
.article-content blockquote {
  max-width: 100%;
  box-sizing: border-box;
}

.article-content img {
  height: auto;
  border-radius: 8px;
  margin: 2em 0;
}

.article-content pre {
  overflow-x: auto;
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 6px;
  font-size: 0.9rem;
  margin: 1.5em 0;
}

.article-content blockquote {
  border-left: 4px solid var(--primary);
  padding-left: 1.5rem;
  margin: 1.5em 0;
  font-style: italic;
  color: var(--gray);
}

.article-content ul,
.article-content ol {
  margin-bottom: 1.5em;
  margin-top: 1em;
  padding-left: 2rem;
  line-height: 1.8;
}

.article-content ul {
  list-style-type: disc;
  list-style-position: outside;
}

.article-content ol {
  list-style-type: decimal;
  list-style-position: outside;
}

.article-content li {
  margin-bottom: 0.75em;
  padding-left: 0.5rem;
}

.article-content li::marker {
  color: rgb(225 92 2); /* --primary */
  color: rgb(225 92 2 / var(--tw-text-opacity));
  font-weight: 600;
}

.article-content ul ul,
.article-content ol ul {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

.article-content ul ul {
  list-style-type: circle;
}

.article-content strong,
.article-content b {
  font-weight: 700;
  color: rgb(17 24 39);
}

.article-content em,
.article-content i {
  font-style: italic;
}

.article-content a {
  color: rgb(225 92 2); /* --primary */
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: all 0.2s ease;
}

.article-content a:hover {
  color: rgb(194 65 12); /* darker primary */
  text-decoration-thickness: 2px;
}

.article-content code {
  background: rgb(243 244 246); /* --light-gray */
  color: rgb(220 38 38); /* red for inline code */
  padding: 0.2em 0.4em;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: 'Courier New', Courier, monospace;
}

.article-content pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 2em 0;
  font-size: 0.95rem;
}

.article-content table th,
.article-content table td {
  border: 1px solid #e5e7eb;
  padding: 12px 16px;
  text-align: left;
}

.article-content table th {
  background: rgb(243 244 246);
  font-weight: 700;
  color: rgb(17 24 39);
}

.article-content table tr:hover {
  background: rgb(249 250 251);
}

.sidebar {
  position: sticky;
  top: 100px;
}

.sidebar-widget {
  background: var(--white);
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-md);
}

.sidebar-widget h4 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 16px;
}

.sidebar-widget ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-widget li {
  margin-bottom: 8px;
}

.sidebar-widget li a {
  color: var(--dark);
  text-decoration: none;
  font-size: 0.95rem;
  line-height: 1.5;
  transition: color 0.2s ease;
}

.sidebar-widget li a:hover {
  color: var(--primary);
}

.tag-chip {
  display: inline-block;
  padding: 6px 12px;
  background: var(--light-gray);
  color: var(--dark);
  text-decoration: none;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.tag-chip:hover {
  background: var(--primary);
  color: white;
}

.article-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  padding: 40px 0;
  border-top: 1px solid #e5e7eb;
  margin-top: 40px;
}

.nav-post {
  padding: 24px;
  background: var(--white);
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
}

.nav-post .label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray);
  margin-bottom: 8px;
  text-transform: uppercase;
}

.nav-post a {
  color: var(--dark);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  line-height: 1.4;
  transition: color 0.2s ease;
}

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

@media (max-width: 1024px) {
  .article-layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
  }
  .article-navigation {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

@media (max-width: 768px) {
  .article-header {
    padding: 30px 0;
  }
  .article-header .container,
  .article-layout,
  .article-navigation {
    padding-left: 16px;
    padding-right: 16px;
    box-sizing: border-box;
  }
  .article-header h1 {
    font-size: 2rem;
  }
  .featured-image {
    height: 250px;
    margin-bottom: 30px;
  }
  .article-layout {
    padding: 30px 16px;
    gap: 24px;
  }
  .article-content {
    font-size: 1rem;
  }
}
