/* ===========================================
   KazaPro — Wiki Styles
   =========================================== */

/* --- Breadcrumb --- */
.breadcrumb {
  background: var(--bg-gray);
  border-bottom: 1px solid var(--border);
  padding: 12px 40px;
}
.breadcrumb-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.breadcrumb a {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color .15s;
}
.breadcrumb a:hover { color: var(--blue-primary); }
.breadcrumb-sep {
  font-size: 13px;
  color: var(--text-pale);
}
.breadcrumb-current {
  font-size: 13px;
  color: var(--text-dark);
  font-weight: 500;
}

/* --- Wiki Hero --- */
.wiki-hero {
  background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue-mid) 100%);
  padding: 56px 40px 48px;
  text-align: center;
}
.wiki-hero-inner { max-width: 760px; margin: 0 auto; }
.wiki-hero-tag {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,0.13);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 9999px;
  padding: 5px 14px;
  margin-bottom: 20px;
  font-size: 12px; font-weight: 600; color: white;
  letter-spacing: 0.05em; text-transform: uppercase;
}
.wiki-hero h1 {
  font-size: 40px; font-weight: 800; color: white;
  line-height: 1.1; letter-spacing: -1px; margin-bottom: 16px;
}
.wiki-hero p {
  font-size: 17px; color: #bfdbfe; line-height: 1.6; margin-bottom: 0;
}
@media (max-width: 600px) {
  .wiki-hero { padding: 40px 20px; }
  .wiki-hero h1 { font-size: 28px; }
  .breadcrumb { padding: 12px 20px; }
}

/* --- Problem Cards Grid (Hub pages) --- */
.wiki-section {
  padding: 64px 40px;
}
.wiki-section-alt {
  background: var(--bg-gray);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.wiki-inner { max-width: 1120px; margin: 0 auto; }
.wiki-inner-narrow { max-width: 800px; margin: 0 auto; }

.wiki-section-label {
  font-size: 12px; font-weight: 700; color: var(--blue-primary);
  letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 10px;
}
.wiki-section-h2 {
  font-size: 30px; font-weight: 800; color: var(--text-dark);
  letter-spacing: -0.6px; line-height: 1.15; margin-bottom: 10px;
}
.wiki-section-sub {
  font-size: 16px; color: var(--text-muted); line-height: 1.6; margin-bottom: 40px;
  max-width: 560px;
}

.problems-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.problem-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 20px 20px 16px;
  text-decoration: none;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.problem-card:hover {
  border-color: rgba(21,93,252,.3);
  box-shadow: 0 4px 16px rgba(21,93,252,.08);
  transform: translateY(-2px);
}
.problem-card-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--blue-light);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background .2s;
}
.problem-card:hover .problem-card-icon { background: #bfdbfe; }
.problem-card-icon svg {
  width: 20px; height: 20px;
  stroke: var(--blue-primary); fill: none; stroke-width: 1.75;
}
.problem-card-body { flex: 1; min-width: 0; }
.problem-card-title {
  font-size: 14px; font-weight: 700; color: var(--text-dark);
  line-height: 1.35; margin-bottom: 4px;
}
.problem-card-desc {
  font-size: 12px; color: var(--text-muted); line-height: 1.5;
}
@media (max-width: 900px) {
  .problems-grid { grid-template-columns: repeat(2, 1fr); }
  .wiki-section { padding: 48px 20px; }
}
@media (max-width: 500px) {
  .problems-grid { grid-template-columns: 1fr; }
}

/* --- Article Layout --- */
.article-wrap {
  padding: 48px 40px 64px;
}
.article-layout {
  max-width: 800px;
  margin: 0 auto;
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.article-tag {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--blue-light);
  color: var(--blue-primary);
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 9999px;
}
.article-reading {
  font-size: 13px; color: var(--text-pale);
  display: flex; align-items: center; gap: 5px;
}
.article-reading svg { width: 13px; height: 13px; stroke: var(--text-pale); fill: none; stroke-width: 2; }
.article-updated {
  font-size: 13px; color: var(--text-pale);
  margin-left: auto;
}

.article-h1 {
  font-size: 36px; font-weight: 800; color: var(--text-dark);
  line-height: 1.15; letter-spacing: -0.8px; margin-bottom: 16px;
}
.article-intro {
  font-size: 17px; color: var(--text-muted); line-height: 1.7;
  margin-bottom: 36px;
  padding: 20px 24px;
  background: var(--blue-pale);
  border-left: 3px solid var(--blue-primary);
  border-radius: 0 10px 10px 0;
}

/* TOC */
.toc {
  background: var(--bg-gray);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 40px;
}
.toc-title {
  font-size: 13px; font-weight: 700; color: var(--text-dark);
  text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 12px;
}
.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.toc-list li a {
  font-size: 14px; color: var(--blue-primary); text-decoration: none;
  display: flex; align-items: center; gap: 6px;
  transition: gap .15s;
}
.toc-list li a:hover { gap: 10px; }
.toc-list li a::before {
  content: '';
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--blue-primary); opacity: 0.5; flex-shrink: 0;
}

/* Article sections */
.article-h2 {
  font-size: 24px; font-weight: 800; color: var(--text-dark);
  letter-spacing: -0.5px; line-height: 1.2;
  margin: 40px 0 16px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.article-h2:first-of-type { border-top: none; }
.article-p {
  font-size: 16px; color: var(--text-muted); line-height: 1.75; margin-bottom: 16px;
}

/* Causes list */
.causes-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}
.cause-item {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.cause-num {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--blue-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; color: var(--blue-primary);
  flex-shrink: 0;
}
.cause-body { flex: 1; }
.cause-title {
  font-size: 15px; font-weight: 700; color: var(--text-dark);
  margin-bottom: 4px;
}
.cause-desc {
  font-size: 14px; color: var(--text-muted); line-height: 1.6;
}
.cause-badge {
  display: inline-flex;
  font-size: 11px; font-weight: 700;
  padding: 2px 8px; border-radius: 9999px;
  margin-top: 6px;
}
.badge-diy { background: #dcfce7; color: #15803d; }
.badge-tech { background: #fee2e2; color: #dc2626; }

/* Checklist */
.checklist {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}
.check-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.check-icon {
  width: 22px; height: 22px; border-radius: 6px;
  background: #dcfce7;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.check-icon svg { width: 12px; height: 12px; stroke: #16a34a; fill: none; stroke-width: 2.5; }
.check-text { font-size: 14px; color: var(--text-muted); line-height: 1.5; }
.check-text strong { color: var(--text-dark); }

/* Warning box */
.warn-box {
  background: #fff7ed;
  border: 1.5px solid var(--orange-border);
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 24px;
}
.warn-box svg { width: 20px; height: 20px; stroke: var(--orange-border); fill: none; stroke-width: 2; flex-shrink: 0; margin-top: 1px; }
.warn-box p { font-size: 14px; color: #92400e; line-height: 1.6; }
.warn-box strong { color: #7c2d12; }

/* Info box */
.info-box {
  background: var(--blue-pale);
  border: 1.5px solid #bfdbfe;
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 24px;
}
.info-box svg { width: 20px; height: 20px; stroke: var(--blue-primary); fill: none; stroke-width: 2; flex-shrink: 0; margin-top: 1px; }
.info-box p { font-size: 14px; color: #1e3a8a; line-height: 1.6; }

/* CTA inline */
.article-cta {
  background: linear-gradient(135deg, var(--blue-dark), var(--blue-mid));
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  margin: 40px 0;
}
.article-cta h3 {
  font-size: 22px; font-weight: 800; color: white;
  margin-bottom: 8px; letter-spacing: -0.4px;
}
.article-cta p { font-size: 15px; color: #bfdbfe; margin-bottom: 20px; line-height: 1.5; }
.article-cta-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.btn-cta-white {
  padding: 12px 24px; border-radius: 10px;
  font-size: 15px; font-weight: 700; font-family: var(--font);
  background: white; color: var(--blue-primary);
  text-decoration: none; display: inline-flex; align-items: center; gap: 8px;
  transition: all .2s; border: none; cursor: pointer;
}
.btn-cta-white:hover { background: var(--blue-pale); transform: translateY(-1px); }
.btn-cta-outline {
  padding: 12px 24px; border-radius: 10px;
  font-size: 15px; font-weight: 700; font-family: var(--font);
  background: rgba(255,255,255,0.12); color: white;
  border: 1.5px solid rgba(255,255,255,0.3);
  text-decoration: none; display: inline-flex; align-items: center; gap: 8px;
  transition: all .2s; cursor: pointer;
}
.btn-cta-outline:hover { background: rgba(255,255,255,0.2); }

/* FAQ */
.wiki-faq { margin-top: 8px; }
.wiki-faq-item {
  border: 1.5px solid var(--border);
  border-radius: 12px;
  margin-bottom: 10px;
  overflow: hidden;
  transition: border-color .2s;
}
.wiki-faq-item.open { border-color: rgba(21,93,252,.3); }
.wiki-faq-btn {
  width: 100%; text-align: left;
  background: var(--white);
  border: none; cursor: pointer;
  padding: 16px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-family: var(--font); font-size: 15px; font-weight: 600; color: var(--text-dark);
  transition: background .2s;
}
.wiki-faq-btn:hover { background: var(--bg-gray); }
.wiki-faq-btn svg {
  width: 16px; height: 16px;
  stroke: var(--text-muted); fill: none; stroke-width: 2.5; stroke-linecap: round;
  flex-shrink: 0; transition: transform .25s;
}
.wiki-faq-item.open .wiki-faq-btn svg { transform: rotate(180deg); }
.wiki-faq-answer {
  display: none;
  padding: 0 20px 16px;
  font-size: 15px; color: var(--text-muted); line-height: 1.7;
}
.wiki-faq-item.open .wiki-faq-answer { display: block; }

/* Related articles */
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.related-card {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.related-card:hover {
  border-color: rgba(21,93,252,.3);
  box-shadow: 0 4px 14px rgba(21,93,252,.07);
  transform: translateY(-2px);
}
.related-card-label {
  font-size: 11px; font-weight: 700; color: var(--blue-primary);
  letter-spacing: 0.06em; text-transform: uppercase;
}
.related-card-title {
  font-size: 14px; font-weight: 700; color: var(--text-dark); line-height: 1.35;
}
.related-card-arrow {
  font-size: 13px; color: var(--blue-primary); font-weight: 600;
  display: flex; align-items: center; gap: 4px; margin-top: auto; padding-top: 4px;
}
.related-card-arrow svg { width: 13px; height: 13px; stroke: var(--blue-primary); fill: none; stroke-width: 2.5; transition: transform .15s; }
.related-card:hover .related-card-arrow svg { transform: translateX(3px); }

/* City links in hub */
.city-links-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}
.city-link {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 9999px;
  padding: 8px 16px;
  font-size: 14px; font-weight: 600; color: var(--text-dark);
  text-decoration: none;
  transition: border-color .2s, color .2s;
}
.city-link svg { width: 14px; height: 14px; stroke: var(--blue-primary); fill: none; stroke-width: 2; }
.city-link:hover { border-color: var(--blue-primary); color: var(--blue-primary); }

@media (max-width: 900px) {
  .related-grid { grid-template-columns: repeat(2, 1fr); }
  .article-wrap { padding: 32px 20px 48px; }
}
@media (max-width: 500px) {
  .related-grid { grid-template-columns: 1fr; }
  .article-h1 { font-size: 28px; }
  .article-cta { padding: 24px 20px; }
}
