/* ============================================
   ARTICLE PAGE STYLES
   ============================================ */

/* Article Header */
.article-header {
  position: relative;
  z-index: 1;
  padding-top: 100px;
}

.article-header__container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--spacing-base);
  text-align: center;
}

/* Breadcrumb */
.article-breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 2rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.article-breadcrumb a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.article-breadcrumb a:hover {
  color: var(--accent-green);
}

.article-breadcrumb svg {
  opacity: 0.5;
}

/* Article Meta */
.article-header__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.article-header__category {
  padding: 6px 14px;
  background: rgba(38, 194, 129, 0.15);
  color: var(--accent-green);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 50px;
}

.article-header__date,
.article-header__read-time {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Article Title */
.article-header__title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

.article-header__title-highlight {
  background: linear-gradient(135deg, #26c281 0%, #22b074 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.article-header__excerpt {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

/* Author */
.article-header__author {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
}

.article-header__author-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
}

.article-header__author-info {
  display: flex;
  flex-direction: column;
  text-align: left;
  gap: 2px;
}

.article-header__author-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.article-header__author-role {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Hero Image */
.article-header__image {
  max-width: 1000px;
  margin: 0 auto;
  border-radius: var(--radius-large);
  overflow: hidden;
  box-shadow: var(--shadow-glass);
}

.article-header__image svg {
  width: 100%;
  height: auto;
  display: block;
}

/* ============================================
   TABLE OF CONTENTS
   ============================================ */
.article-toc {
  max-width: 800px;
  margin: 3rem auto;
  padding: 2rem;
}

.article-toc__title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
}

.article-toc__title svg {
  color: var(--accent-green);
}

.article-toc__nav ol {
  list-style: none;
  counter-reset: toc-counter;
}

.article-toc__nav li {
  counter-increment: toc-counter;
  margin-bottom: 0.75rem;
}

.article-toc__nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9375rem;
  transition: all 0.2s ease;
}

.article-toc__nav a::before {
  content: counter(toc-counter);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.article-toc__nav a:hover {
  color: var(--accent-green);
}

.article-toc__nav a:hover::before {
  background: rgba(38, 194, 129, 0.2);
  color: var(--accent-green);
}

/* ============================================
   ARTICLE CONTENT
   ============================================ */
.article-content {
  position: relative;
  z-index: 1;
  padding: 2rem 0 4rem;
}

.article-content__container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 var(--spacing-base);
}

/* Typography */
.article-content h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 3rem 0 1.5rem;
  padding-top: 1rem;
}

.article-content h2:first-of-type {
  margin-top: 0;
}

.article-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 2rem 0 1rem;
}

.article-content p {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.article-content ul,
.article-content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.article-content li {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.article-content code {
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  font-family: 'Fira Code', 'Monaco', monospace;
  font-size: 0.875em;
  color: var(--accent-green);
}

/* Intro Box */
.article-intro {
  display: flex;
  gap: 1rem;
  padding: 1.5rem;
  margin-bottom: 2rem;
  border-left: 3px solid var(--accent-green);
}

.article-intro__icon {
  flex-shrink: 0;
  color: var(--accent-green);
}

.article-intro__content {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* Benefits List */
.article-benefits {
  margin: 2rem 0;
}

.article-benefits h3 {
  margin-bottom: 1rem;
}

.article-check-list {
  list-style: none;
  padding: 0;
}

.article-check-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 1rem;
}

.article-check-list svg {
  flex-shrink: 0;
  margin-top: 2px;
}

/* Comparison Cards */
.article-comparison {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin: 2rem 0;
}

.article-comparison__item {
  padding: 1.5rem;
}

.article-comparison__header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 1rem;
}

.article-comparison__header h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.article-comparison__badge {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  width: fit-content;
}

.article-comparison__badge--green {
  background: rgba(38, 194, 129, 0.15);
  color: var(--accent-green);
}

.article-comparison__item p {
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.article-comparison__item ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.article-comparison__item li {
  font-size: 0.8125rem;
  padding: 4px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.article-comparison__item li:first-child {
  border-top: none;
}

@media (max-width: 900px) {
  .article-comparison {
    grid-template-columns: 1fr;
  }
}

/* Tip Box */
.article-tip {
  display: flex;
  gap: 1rem;
  padding: 1.5rem;
  margin: 2rem 0;
  border: 1px solid rgba(38, 194, 129, 0.3);
  background: rgba(38, 194, 129, 0.05);
}

.article-tip__icon {
  flex-shrink: 0;
  color: var(--accent-green);
}

.article-tip__content {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* Warning Box */
.article-warning {
  display: flex;
  gap: 1rem;
  padding: 1.5rem;
  margin: 2rem 0;
  border: 1px solid rgba(255, 179, 0, 0.3);
  background: rgba(255, 179, 0, 0.05);
}

.article-warning__icon {
  flex-shrink: 0;
  color: #ffb300;
}

.article-warning__content {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* Steps List */
.article-steps {
  list-style: none;
  padding: 0;
  margin: 2rem 0;
}

.article-steps li {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.article-steps li:last-child {
  border-bottom: none;
}

.article-steps__number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(38, 194, 129, 0.15);
  border-radius: 50%;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--accent-green);
  flex-shrink: 0;
}

.article-steps__content strong {
  display: block;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.article-steps__content p {
  font-size: 0.9375rem;
  margin: 0;
}

/* Code Block */
.article-code {
  margin: 1.5rem 0;
  border-radius: var(--radius-small);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.article-code__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.article-code__header span {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.article-code__copy {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.article-code__copy:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.article-code pre {
  margin: 0;
  padding: 1.5rem;
  overflow-x: auto;
}

.article-code code {
  display: block;
  padding: 0;
  background: transparent;
  font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* File List */
.article-file-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.article-file-list li {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-small);
  margin-bottom: 0.75rem;
}

.article-file-list__icon {
  flex-shrink: 0;
  color: var(--accent-green);
}

.article-file-list__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.article-file-list__info strong {
  font-size: 0.9375rem;
  color: var(--text-primary);
}

.article-file-list__info span {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Image */
.article-image {
  margin: 2rem 0;
  padding: 1.5rem;
  text-align: center;
}

.article-image__placeholder svg {
  width: 100%;
  max-width: 600px;
  height: auto;
  border-radius: var(--radius-small);
}

.article-image__caption {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  font-style: italic;
}

/* FAQ / Accordion */
.article-faq {
  margin: 2rem 0;
}

.article-faq__item {
  margin-bottom: 1rem;
  padding: 0;
  overflow: hidden;
}

.article-faq__item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  color: var(--text-primary);
  transition: all 0.3s ease;
}

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

.article-faq__item summary svg {
  flex-shrink: 0;
  transition: transform 0.3s ease;
  color: var(--text-muted);
}

.article-faq__item[open] summary svg {
  transform: rotate(180deg);
}

.article-faq__item summary:hover {
  color: var(--accent-green);
}

.article-faq__answer {
  padding: 0 1.5rem 1.5rem;
}

.article-faq__answer p {
  margin-bottom: 1rem;
}

.article-faq__answer ul {
  margin: 0;
}

.article-faq__answer code {
  display: block;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  margin-top: 0.5rem;
}

/* Summary Checklist */
.article-summary {
  padding: 2rem;
  margin: 2rem 0;
}

.article-summary h3 {
  font-size: 1.25rem;
  margin: 0 0 1.5rem;
  color: var(--text-primary);
}

.article-checklist {
  list-style: none;
  padding: 0;
  margin: 0;
}

.article-checklist li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.article-checklist li:last-child {
  border-bottom: none;
}

.article-checklist input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--accent-green);
  cursor: pointer;
}

.article-checklist label {
  cursor: pointer;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.article-checklist input:checked + label {
  color: var(--accent-green);
  text-decoration: line-through;
  text-decoration-color: rgba(38, 194, 129, 0.5);
}

/* CTA Box */
.article-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 2rem;
  margin: 3rem 0;
  background: linear-gradient(135deg, rgba(38, 194, 129, 0.1) 0%, rgba(43, 0, 255, 0.1) 100%);
  border: 1px solid rgba(38, 194, 129, 0.3);
}

.article-cta h3 {
  font-size: 1.25rem;
  color: var(--text-primary);
  margin: 0 0 0.5rem;
}

.article-cta p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin: 0;
}

@media (max-width: 767px) {
  .article-cta {
    flex-direction: column;
    text-align: center;
  }

  .article-cta .btn {
    width: 100%;
  }
}

/* Share */
.article-share {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 2rem;
}

.article-share__label {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.article-share__buttons {
  display: flex;
  gap: 8px;
}

.article-share__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-small);
  color: var(--text-secondary);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.article-share__btn:hover {
  border-color: var(--accent-green);
  color: var(--accent-green);
  transform: translateY(-2px);
}

/* ============================================
   RELATED ARTICLES
   ============================================ */
.article-related {
  position: relative;
  z-index: 1;
  padding: 4rem 0;
  background: rgba(0, 0, 0, 0.15);
}

.article-related__container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 var(--spacing-base);
}

.article-related__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 2rem;
}

.article-related__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.article-related__card {
  display: block;
  text-decoration: none;
  overflow: hidden;
  transition: all 0.3s ease;
}

.article-related__card:hover {
  transform: translateY(-8px);
}

.article-related__image {
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.article-related__image svg {
  width: 100%;
  height: 100%;
  transition: transform 0.5s ease;
}

.article-related__card:hover .article-related__image svg {
  transform: scale(1.05);
}

.article-related__content {
  padding: 1.25rem;
}

.article-related__category {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(38, 194, 129, 0.15);
  color: var(--accent-green);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 50px;
  margin-bottom: 0.75rem;
}

.article-related__content h3 {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
  margin: 0;
  transition: color 0.2s ease;
}

.article-related__card:hover h3 {
  color: var(--accent-green);
}

@media (max-width: 900px) {
  .article-related__grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 767px) {
  .article-header {
    padding-top: 80px;
  }

  .article-header__title {
    font-size: 1.75rem;
  }

  .article-breadcrumb {
    font-size: 0.8125rem;
    flex-wrap: wrap;
  }

  .article-toc {
    padding: 1.5rem;
  }

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

  .article-share {
    flex-direction: column;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .article-related__card,
  .article-related__image svg {
    transition: none;
  }

  .article-related__card:hover {
    transform: none;
  }

  .article-related__card:hover .article-related__image svg {
    transform: none;
  }
}
