/* Blog Article Styles */

.blog-article {
  max-width: 720px;
  margin: 0 auto;
}

.back-link {
  display: inline-block;
  margin-bottom: 24px;
  color: var(--accent);
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}

/* Article Header */
.article-header {
  margin-bottom: 48px;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
  font-size: 0.9rem;
}

.article-meta .category {
  display: inline-block;
  padding: 4px 10px;
  background: var(--accent);
  color: white;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.article-meta .date,
.article-meta .reading-time {
  color: var(--muted);
}

.article-header h1 {
  font-size: 2.2rem;
  line-height: 1.2;
  margin-bottom: 16px;
}

.article-header .lead {
  font-size: 1.15rem;
  color: var(--muted);
  line-height: 1.7;
}

/* Table of Contents */
.toc-box {
  background: var(--bg-soft);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 48px;
}

.toc-box strong {
  display: block;
  margin-bottom: 12px;
}

.toc-box ul {
  margin: 0;
  padding-left: 20px;
}

.toc-box li {
  margin-bottom: 8px;
}

.toc-box a {
  color: var(--ink);
  text-decoration: none;
}

.toc-box a:hover {
  color: var(--accent);
}

/* Article Content */
.article-content {
  line-height: 1.8;
}

.article-content h2 {
  margin-top: 48px;
  margin-bottom: 20px;
  font-size: 1.5rem;
}

.article-content h3 {
  margin-top: 32px;
  margin-bottom: 16px;
  font-size: 1.2rem;
}

.article-content h4 {
  margin-top: 24px;
  margin-bottom: 12px;
  font-size: 1rem;
}

.article-content p {
  margin-bottom: 16px;
  color: var(--muted);
}

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

.article-content li {
  margin-bottom: 8px;
  color: var(--muted);
}

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

.article-content hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 48px 0;
}

/* Blockquote */
.article-content blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 20px;
  margin: 32px 0;
  font-style: italic;
}

.article-content blockquote p {
  font-size: 1.1rem;
  color: var(--ink);
  margin-bottom: 8px;
}

.article-content blockquote cite {
  font-size: 0.9rem;
  color: var(--muted);
  font-style: normal;
}

/* Info Box */
.info-box {
  background: var(--bg-soft);
  border-radius: 12px;
  padding: 24px;
  margin: 24px 0;
}

.info-box p {
  margin-bottom: 8px;
}

.info-box p:last-child {
  margin-bottom: 0;
}

/* Tip Box */
.tip-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  padding: 20px;
  margin: 24px 0;
  color: #166534;
}

/* Highlight Box */
.highlight-box {
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 12px;
  padding: 20px;
  margin: 24px 0;
  text-align: center;
}

.highlight-box p {
  color: #92400e;
  font-size: 1.1rem;
  margin: 0;
}

/* Example Boxes */
.example-box {
  border-radius: 12px;
  padding: 20px;
  margin: 16px 0;
}

.example-box.bad {
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.example-box.bad h4 {
  color: #dc2626;
  margin-top: 0;
}

.example-box.good {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}

.example-box.good h4 {
  color: #16a34a;
  margin-top: 0;
}

.example-box p {
  margin-bottom: 0;
}

/* Structure Box */
.structure-box {
  background: var(--bg-soft);
  border-radius: 12px;
  padding: 24px;
  margin: 24px 0;
}

.structure-box h4 {
  margin-top: 20px;
  margin-bottom: 8px;
  color: var(--accent);
}

.structure-box h4:first-child {
  margin-top: 0;
}

.structure-box ul {
  margin-bottom: 0;
}

/* Step List */
.step-list {
  margin: 32px 0;
}

.step {
  display: flex;
  gap: 20px;
  margin-bottom: 24px;
}

.step-number {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: var(--accent);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.step-content h4 {
  margin-top: 0;
  margin-bottom: 8px;
}

.step-content ul {
  margin-bottom: 0;
}

/* Details/Accordion */
.article-content details {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 12px;
}

.article-content details summary {
  padding: 16px;
  cursor: pointer;
  list-style: none;
}

.article-content details summary::-webkit-details-marker {
  display: none;
}

.article-content details summary::before {
  content: "+";
  margin-right: 12px;
  font-weight: 700;
  color: var(--accent);
}

.article-content details[open] summary::before {
  content: "−";
}

.article-content details p {
  padding: 0 16px 16px;
  margin: 0;
}

/* Article CTA */
.article-cta {
  background: linear-gradient(135deg, rgba(14, 90, 87, 0.06), rgba(14, 90, 87, 0.02));
  border-radius: 16px;
  padding: 40px;
  margin: 48px 0;
  text-align: center;
}

.article-cta h3 {
  margin-top: 0;
  margin-bottom: 12px;
}

.article-cta p {
  color: var(--muted);
  margin-bottom: 24px;
}

/* Related Posts */
.related-posts {
  border-top: 1px solid var(--line);
  padding-top: 32px;
  margin-top: 48px;
}

.related-posts h3 {
  margin-top: 0;
  margin-bottom: 16px;
  font-size: 1.1rem;
}

.related-posts ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.related-posts li {
  margin-bottom: 8px;
}

.related-posts a {
  color: var(--accent);
  text-decoration: none;
}

.related-posts a:hover {
  text-decoration: underline;
}

/* Reading Progress */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--accent);
  width: 0%;
  z-index: 1000;
  transition: width 0.1s;
}

/* Grid in articles */
.article-content .grid-2 {
  display: grid;
  gap: 16px;
  margin: 24px 0;
}

@media (min-width: 600px) {
  .article-content .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.article-content .grid-2 .card {
  padding: 20px;
}

.article-content .grid-2 .card h4 {
  margin-top: 0;
  margin-bottom: 12px;
}

.article-content .grid-2 .card ul {
  margin-bottom: 0;
}

/* Mobile Adjustments */
@media (max-width: 600px) {
  .article-header h1 {
    font-size: 1.75rem;
  }

  .article-meta {
    flex-direction: column;
    gap: 8px;
  }

  .step {
    flex-direction: column;
    gap: 12px;
  }
}
