/* Knowledge (Vaamana) — Single-page authority layout */

/* =========================
   CSS Variables
   ========================= */
:root {
  --text-dark: #151a20;
  --text-light: #606b75;
  --border-light: rgba(0,0,0,0.08);
  --fundamentals-color: #2ecc71;
  --optimization-color: #f39c12;
  --advanced-color: #9b59b6;
}

body{
  background: #f7f8fa;
}

/* =========================
   Page Header
   ========================= */
.page-header--themed {
  background: linear-gradient(135deg, rgba(198,40,40,0.06), rgba(198,40,40,0.02));
  border-bottom: 1px solid var(--border-light);
}

.page-header--themed .page-header-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 42px 24px 32px;
}

.page-header--themed .page-title {
  margin: 0 0 10px;
  font-size: 2.2rem;
  letter-spacing: -0.2px;
  color: var(--text-dark);
  font-weight: 900;
  text-align: center;
}

.page-header--themed .page-subtitle {
  margin: 0 auto;
  max-width: 65ch;
  color: var(--text-light);
  line-height: 1.85;
  font-size: 1.05rem;
  text-align: center;
}

.breadcrumb {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  color: var(--text-light);
  margin-bottom: 16px;
}

.breadcrumb a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(0,0,0,0.18);
}

.breadcrumb a:hover {
  color: var(--text-dark);
}

.crumb-sep {
  opacity: 0.7;
}

/* Search Box */
.knowledge-search-container {
  position: relative;
  max-width: 600px;
  margin: 24px auto 0;
}

/* Article Stats (on detail page header) */
.article-stats {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 16px;
  font-size: 0.9rem;
  color: #999;
  flex-wrap: wrap;
}

.article-stat-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.article-stat-item i {
  font-size: 0.85rem;
}

.knowledge-search-box {
  width: 100%;
  padding: 0.9rem 0.9rem 0.9rem 2.8rem;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.knowledge-search-box:focus {
  outline: none;
  border-color: #c62828;
  box-shadow: 0 0 0 3px rgba(198, 40, 40, 0.1);
}

.knowledge-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
}


/* subtle paper canvas */
.knowledge-container{
  padding-top: 40px;
  padding-bottom: 80px;
}

.knowledge-article{
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 36px 44px;
}

@media (max-width: 768px){
  .knowledge-article{
    padding: 24px 20px;
  }
}


/* =========================
   Main Container
   ========================= */
.knowledge-container.knowledge-single-page {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

/* =========================
   Featured Article (Optional)
   ========================= */
.knowledge-featured {
  background: linear-gradient(to right, #fff5e6, #fff9f0);
  border: 1px solid #ffe0b3;
  border-left: 4px solid #ff9800;
  border-radius: 8px;
  padding: 24px 28px;
  margin-bottom: 48px;
}

.knowledge-featured-badge {
  display: inline-block;
  font-size: 0.85rem;
  color: #e65100;
  font-weight: 600;
  margin-bottom: 8px;
}

.knowledge-featured-badge i {
  color: #ff9800;
  margin-right: 4px;
}

.knowledge-featured-title {
  margin: 0 0 8px;
  font-size: 1.5rem;
  line-height: 1.4;
}

.knowledge-featured-title a {
  color: var(--text-dark);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s;
}

.knowledge-featured-title a:hover {
  border-bottom-color: #ff9800;
}

.knowledge-featured-excerpt {
  color: var(--text-light);
  line-height: 1.65;
  margin: 0 0 12px;
}

.knowledge-featured-meta {
  display: flex;
  gap: 16px;
  font-size: 0.88rem;
  color: #999;
  flex-wrap: wrap;
}

.knowledge-featured-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* =========================
   Knowledge Sections
   ========================= */
.knowledge-section {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 32px 28px;
  margin-bottom: 32px;
}

.knowledge-section-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid #f5f5f5;
}

.knowledge-section-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 1.5rem;
}

.knowledge-section-fundamentals .knowledge-section-icon {
  background: rgba(46, 204, 113, 0.1);
  color: var(--fundamentals-color);
}

.knowledge-section-optimization .knowledge-section-icon {
  background: rgba(243, 156, 18, 0.1);
  color: var(--optimization-color);
}

.knowledge-section-advanced .knowledge-section-icon {
  background: rgba(155, 89, 182, 0.1);
  color: var(--advanced-color);
}

.knowledge-section-title {
  margin: 0 0 6px;
  font-size: 1.4rem;
  color: var(--text-dark);
  font-weight: 700;
}

.knowledge-section-description {
  margin: 0;
  color: var(--text-light);
  line-height: 1.6;
  font-size: 0.95rem;
}

/* =========================
   Article Lists
   ========================= */
.knowledge-article-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.knowledge-article-item {
  margin: 0;
  padding: 10px 0;
  border-bottom: 1px solid #f5f5f5;
}

.knowledge-article-item:last-child {
  border-bottom: none;
}

.knowledge-article-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-dark);
  padding: 4px 0;
  transition: color 0.2s;
}

.knowledge-article-link:hover {
  color: #c62828;
}

.knowledge-article-link i {
  flex-shrink: 0;
  font-size: 0.7rem;
  color: #bbb;
  transition: color 0.2s;
}

.knowledge-article-link:hover i {
  color: #c62828;
}

.knowledge-article-title {
  flex: 1;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5;
}

.knowledge-article-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.knowledge-views {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: #999;
}

.knowledge-views i {
  font-size: 0.7rem;
}

.knowledge-badge-new {
  flex-shrink: 0;
  background: #e74c3c;
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.knowledge-article-empty {
  padding: 12px 0;
  color: #999;
  font-style: italic;
  font-size: 0.95rem;
}

/* =========================
   Article Detail Page
   ========================= */
.knowledge-article {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 32px 40px;
}

.article-featured-image {
  width: 100%;
  margin: 0 0 32px;
  border-radius: 8px;
  overflow: hidden;
  background: #f5f5f5;
}

.article-featured-image img {
  width: 100%;
  height: auto;
  display: block;
}

.kb{
  max-width: 72ch;
  margin-left: auto;
  margin-right: auto;
}

.kb h2 {
  margin-top: 24px;
  margin-bottom: 10px;
  font-size: 1.3rem;
  color: var(--text-dark);
  font-weight: 700;
}

.kb p {
  margin: 0 0 16px;
  color: var(--text-dark);
  line-height: 1.75;
}

/* Images in article content */
.knowledge-article img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 24px auto;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.knowledge-article table {
  width: 100%;
  margin: 24px 0;
  border-collapse: collapse;
}

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

.knowledge-article table th {
  background-color: #f5f5f5;
  font-weight: 600;
}

.kb-lead {
  font-size: 1.1rem;
  color: var(--text-dark);
  font-weight: 500;
}

/* =========================
   Related Sections
   ========================= */
.article-related-section {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 32px 40px;
  margin-top: 32px;
}

.related-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 24px;
  font-size: 1.3rem;
  color: var(--text-dark);
  font-weight: 700;
  padding-bottom: 16px;
  border-bottom: 2px solid #f5f5f5;
}

.related-section-title i {
  color: #c62828;
  font-size: 1.1rem;
}

.related-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.related-item-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 20px;
  background: #fff;
  transition: all 0.2s;
  position: relative;
}

.related-item-card:hover {
  border-color: #c62828;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.related-item-image {
  width: 100%;
  height: 160px;
  margin-bottom: 16px;
  border-radius: 6px;
  overflow: hidden;
  background: #f5f5f5;
}

.related-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.related-item-content {
  flex: 1;
}

.related-article-category {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.related-item-title {
  margin: 0 0 10px;
  font-size: 1.1rem;
  color: var(--text-dark);
  font-weight: 600;
  line-height: 1.4;
}

.related-item-description {
  margin: 0;
  color: var(--text-light);
  font-size: 0.9rem;
  line-height: 1.6;
}

.related-article-meta {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  font-size: 0.85rem;
  color: #999;
}

.related-article-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.related-article-meta i {
  font-size: 0.8rem;
}

.related-item-arrow {
  position: absolute;
  top: 20px;
  right: 20px;
  color: #ccc;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.related-item-card:hover .related-item-arrow {
  color: #c62828;
  transform: translateX(4px);
}

/* Machine Models */
.machine-models-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.machine-model-tag {
  display: inline-block;
  padding: 10px 18px;
  background: #f5f5f5;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  color: var(--text-dark);
  font-size: 0.95rem;
  font-weight: 500;
}

/* Article Tags */
.article-tags-section {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 24px 40px;
  margin-top: 32px;
}

.tags-title {
  margin: 0 0 12px;
  font-size: 0.9rem;
  color: var(--text-light);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

.article-tag {
  display: inline-block;
  padding: 6px 14px;
  background: #f5f5f5;
  color: var(--text-dark);
  font-size: 0.88rem;
  border-radius: 20px;
  font-weight: 500;
}

/* =========================
   Responsive
   ========================= */
@media (max-width: 768px) {
  .page-header--themed .page-header-inner {
    padding: 32px 16px 24px;
  }

  .page-header--themed .page-title {
    font-size: 1.75rem;
  }

  .page-header--themed .page-subtitle {
    font-size: 0.98rem;
  }

  .knowledge-container.knowledge-single-page {
    padding: 24px 16px 60px;
  }

  .knowledge-section {
    padding: 24px 20px;
  }

  .knowledge-section-header {
    gap: 12px;
  }

  .knowledge-section-icon {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }

  .knowledge-section-title {
    font-size: 1.2rem;
  }

  .knowledge-article {
    padding: 24px 20px;
  }

  .knowledge-featured {
    padding: 20px 20px;
  }

  .knowledge-featured-title {
    font-size: 1.3rem;
  }
}

@media (max-width: 480px) {
  .knowledge-article-link {
    gap: 8px;
  }

  .knowledge-article-title {
    font-size: 0.95rem;
  }
}
