/**
 * Knowledge Center Styles - Mobile-First Design
 */

/* Skärmläsare: synlig endast för assistentteknik */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:root {
  --knowledge-primary: #667eea;
  --knowledge-secondary: #764ba2;
  --knowledge-success: #10b981;
  --knowledge-warning: #f59e0b;
  --knowledge-danger: #ef4444;
  --knowledge-info: #3b82f6;
}

/* Vit bakgrund på body */
body {
  background: #ffffff !important;
}

/* ========== FEEDBACK WIDGET ========== */
.feedback-widget {
  background: white;
  border: 3px solid #e2e8f0;
  border-radius: 20px;
  padding: 2.5rem;
  margin: 3rem 0;
  text-align: center;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.feedback-widget h3 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 0.75rem 0;
}

.feedback-widget > p {
  font-size: 1rem;
  color: #475569;
  margin-bottom: 2rem;
  font-weight: 500;
}

.feedback-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.feedback-btn {
  flex: 1;
  min-width: 200px;
  max-width: 250px;
  padding: 1.25rem 2rem;
  border: 2px solid transparent;
  border-radius: 16px;
  font-size: 1.125rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.feedback-btn i {
  font-size: 1.5rem;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.1));
}

.feedback-btn-yes {
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  color: #065f46;
  border: 3px solid #10b981;
}

.feedback-btn-yes:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(16, 185, 129, 0.3);
  background: linear-gradient(135deg, #a7f3d0, #6ee7b7);
}

.feedback-btn-no {
  background: linear-gradient(135deg, #fecaca, #fca5a5);
  color: #991b1b;
  border: 3px solid #ef4444;
}

.feedback-btn-no:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(239, 68, 68, 0.3);
  background: linear-gradient(135deg, #fca5a5, #f87171);
}

.feedback-widget--comment {
  text-align: left;
}

.feedback-comment-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.5rem;
}

.feedback-comment-input {
  width: 100%;
  box-sizing: border-box;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.85rem 1rem;
  font: inherit;
  font-size: 0.95rem;
  color: #0f172a;
  resize: vertical;
  min-height: 110px;
  margin-bottom: 1rem;
  background: #fff;
}

.feedback-comment-input:focus {
  outline: none;
  border-color: #94a3b8;
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.25);
}

.feedback-comment-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.feedback-comment-actions .feedback-btn {
  flex: 0 1 auto;
  min-width: 140px;
  max-width: none;
  padding: 0.85rem 1.25rem;
  font-size: 0.95rem;
}

.feedback-btn-skip {
  background: #f8fafc;
  color: #475569;
  border: 2px solid #e2e8f0;
  text-shadow: none;
}

.feedback-btn-skip:hover {
  transform: translateY(-2px);
  background: #f1f5f9;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.feedback-success {
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
  border-color: #10b981;
}

.feedback-success-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  animation: scaleIn 0.5s ease-out;
}

@keyframes scaleIn {
  from {
    transform: scale(0);
  }
  to {
    transform: scale(1);
  }
}

.feedback-success h3 {
  color: #065f46;
  margin-bottom: 0.75rem;
}

.feedback-success p {
  color: #059669;
  margin-bottom: 0;
}

/* ========== TABLE OF CONTENTS ========== */
.toc-widget {
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-left: 4px solid #667eea;
  border-radius: 12px;
  padding: 1.5rem;
  margin: 2rem 0;
  max-width: 800px;
}

.toc-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.toc-header i {
  color: #667eea;
  font-size: 1.25rem;
}

.toc-header h3 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  color: #0f172a;
}

.toc-nav {
  max-height: 400px;
  overflow-y: auto;
}

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

.toc-item {
  margin-bottom: 0.5rem;
}

.toc-item-indent {
  padding-left: 1.5rem;
}

.toc-link {
  display: block;
  color: #475569;
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  transition: all 0.2s;
  font-size: 0.9375rem;
  font-weight: 500;
}

.toc-link:hover {
  background: #e2e8f0;
  color: #667eea;
  padding-left: 1rem;
}

.toc-link-active {
  background: #ddd6fe;
  color: #667eea;
  font-weight: 700;
  border-left: 3px solid #667eea;
  padding-left: 1rem;
}

/* Sticky TOC for desktop */
@media (min-width: 1200px) {
  .toc-widget {
    position: sticky;
    top: 100px;
    max-width: 300px;
    float: right;
    margin-left: 2rem;
    margin-right: -320px;
  }
}

/* Hide TOC on mobile for very short articles */
@media (max-width: 768px) {
  .toc-widget {
    padding: 1.25rem;
  }
  
  .toc-nav {
    max-height: 300px;
  }
}

/* ========== HELP CTA WIDGET ========== */
.help-cta-widget {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 24px;
  padding: 3rem 2rem;
  margin: 3rem 0;
  text-align: center;
  color: white;
  box-shadow: 0 12px 40px rgba(102, 126, 234, 0.3);
}

.help-cta-content {
  margin-bottom: 2rem;
}

.help-cta-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

.help-cta-widget h3 {
  font-size: 1.75rem;
  font-weight: 800;
  color: white;
  margin: 0 0 0.75rem 0;
}

.help-cta-widget p {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.95);
  margin: 0;
}

.help-cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.help-cta-btn {
  flex: 1;
  min-width: 240px;
  max-width: 300px;
  padding: 1.25rem 2rem;
  border-radius: 14px;
  font-size: 1.0625rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.help-cta-primary {
  background: white;
  color: #667eea;
  border: 2px solid white;
}

.help-cta-primary:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(255, 255, 255, 0.4);
}

.help-cta-secondary {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(10px);
}

.help-cta-secondary:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-4px);
}

/* ========== DOWNLOAD WIDGET ========== */
.download-widget {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 3px solid #3b82f6;
  border-radius: 20px;
  padding: 2rem;
  margin: 2rem 0;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  transition: all 0.3s;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.15);
}

.download-widget:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(59, 130, 246, 0.25);
  border-color: #2563eb;
}

.download-icon-box {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: white;
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
}

.download-content {
  flex: 1;
}

.download-content h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.download-badge {
  display: inline-block;
  background: #3b82f6;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.download-content p {
  color: #475569;
  margin: 0 0 0.75rem 0;
  font-size: 0.9375rem;
}

.download-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 1rem;
}

.download-meta span {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.download-meta i {
  color: #3b82f6;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
  padding: 0.875rem 1.75rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.3s;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.download-btn i {
  font-size: 1.125rem;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .download-widget {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem;
  }
  
  .download-icon-box {
    width: 70px;
    height: 70px;
    font-size: 2rem;
  }
  
  .download-content h3 {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .download-meta {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .download-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ========== BACK TO TOP BUTTON ========== */
.back-to-top-btn {
  position: fixed;
  bottom: calc(90px + env(safe-area-inset-bottom));
  right: 1.5rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
  z-index: 999;
  opacity: 0;
  transform: translateY(100px) scale(0.8);
  transition: all 0.3s ease-out;
  pointer-events: none;
}

.back-to-top-btn.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.back-to-top-btn:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 12px 32px rgba(102, 126, 234, 0.5);
}

.back-to-top-btn:active {
  transform: translateY(-2px) scale(1);
}

/* Hide on desktop */
@media (min-width: 769px) {
  .back-to-top-btn {
    display: none;
  }
}

/* Mobile responsive */
@media (max-width: 768px) {
  .feedback-widget {
    padding: 2rem 1.5rem;
    margin: 2rem 0;
  }
  
  .feedback-btn {
    min-width: 100%;
    max-width: 100%;
  }
  
  .help-cta-widget {
    padding: 2rem 1.5rem;
    margin: 2rem 0;
  }
  
  .help-cta-buttons {
    flex-direction: column;
  }
  
  .help-cta-btn {
    min-width: 100%;
    max-width: 100%;
  }
  
  .back-to-top-btn {
    width: 50px;
    height: 50px;
    bottom: calc(80px + env(safe-area-inset-bottom));
    right: 1rem;
  }
}

/* ========== VIEW COUNTER & TRENDING ========== */
.view-counter {
  color: #64748b;
  font-weight: 500;
}

.view-counter i {
  color: #f59e0b;
}

.trending-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #f59e0b, #ec4899);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 800;
  font-size: 0.8125rem;
  letter-spacing: 0.5px;
  animation: pulse 2s ease-in-out infinite;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.trending-badge i {
  font-size: 1rem;
  animation: flicker 1.5s ease-in-out infinite;
}

@keyframes flicker {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.trending-badge-card {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #f59e0b, #ec4899);
  color: white;
  padding: 0.5rem 0.875rem;
  border-radius: 16px;
  font-weight: 800;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.4);
  z-index: 10;
}

.trending-badge-card i {
  font-size: 0.875rem;
}

.view-count-meta {
  color: #64748b;
  font-size: 0.875rem;
}

.view-count-meta i {
  color: #f59e0b;
}

/* Article card positioning for trending badge */
.article-card {
  position: relative;
}

/* ========== HOT TOPICS 2026 ========== */
.hot-topics-2026 {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border: 3px solid #334155;
  border-radius: 20px;
  padding: 2rem;
  margin: 2rem auto;
  max-width: 1200px;
  position: relative;
}

.hot-badge {
  position: absolute;
  top: -15px;
  left: 20px;
  background: linear-gradient(135deg, #475569, #64748b);
  color: white;
  padding: 0.5rem 1.5rem;
  border-radius: 20px;
  font-weight: 800;
  font-size: 0.875rem;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.45);
}

.hot-topics-2026 h3 {
  margin-top: 0.5rem;
  margin-bottom: 1.5rem;
  color: #f8fafc;
  font-size: 1.5rem;
  font-weight: 700;
}

.hot-pills {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.hot-pill {
  background: #ffffff;
  border: 2px solid #cbd5e1;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #0f172a;
  font-size: 0.95rem;
}

.hot-pill:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.2);
  background: #f8fafc;
  border-color: #94a3b8;
}

.pill-icon {
  font-size: 1.5rem;
}

/* ========== QUICK FAQ ========== */
.quick-faq {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 2rem 1.5rem;
  background: white;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.quick-faq h3 {
  margin-top: 0;
  margin-bottom: 1.5rem;
  color: #0f172a;
  font-size: 1.25rem;
  font-weight: 700;
}

.faq-pills {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.faq-pills button {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border: 2px solid #cbd5e1;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  color: #334155;
  text-align: left;
  font-size: 0.925rem;
}

.faq-pills button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
  background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
  border-color: #94a3b8;
}

/* Mobile adjustments for HOT TOPICS */
@media (max-width: 768px) {
  .hot-topics-2026 {
    margin: 1rem;
    padding: 1.5rem;
  }
  
  .hot-topics-2026 h3 {
    font-size: 1.125rem;
  }
  
  .hot-pills {
    grid-template-columns: 1fr;
  }
  
  .quick-faq {
    margin: 1rem;
    padding: 1.5rem 1rem;
  }
  
  .faq-pills {
    grid-template-columns: 1fr;
  }
}

/* ========== ROT CALCULATOR WIDGET ========== */
.rot-calculator-widget {
  max-width: 600px;
  margin: 3rem auto;
  padding: 2rem 1.5rem;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border-radius: 20px;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.35);
  border: 3px solid #334155;
}

.rot-calculator-widget h2 {
  font-size: 1.75rem;
  font-weight: 800;
  color: #f8fafc;
  margin-bottom: 0.5rem;
  text-align: center;
}

.calculator-intro {
  text-align: center;
  color: #cbd5e1;
  margin-bottom: 2rem;
}

.calculator-box {
  background: white;
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.5rem;
}

.form-group input {
  width: 100%;
  padding: 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 1.125rem;
  transition: all 0.3s;
}

.form-group input:focus {
  outline: none;
  border-color: #64748b;
  box-shadow: 0 0 0 3px rgba(100, 116, 139, 0.2);
}

.rot-calc-error {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  background: #fef2f2;
  border: 2px solid #ef4444;
  border-radius: 10px;
  color: #b91c1c;
  font-weight: 600;
  font-size: 0.9375rem;
}

.calculate-btn {
  width: 100%;
  background: linear-gradient(135deg, #475569, #64748b);
  color: white;
  border: none;
  padding: 1.25rem;
  border-radius: 12px;
  font-size: 1.125rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.calculate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.35);
}

.calculate-btn:active {
  transform: translateY(0);
}

.result-box {
  margin-top: 2rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border-radius: 12px;
  border: 2px solid #10b981;
}

.result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid #a7f3d0;
}

.result-item:last-of-type {
  border-bottom: none;
}

.result-item.total {
  margin-top: 0.5rem;
  padding-top: 1rem;
  border-top: 2px solid #10b981;
  border-bottom: none;
}

.result-label {
  font-weight: 600;
  color: #0f172a;
}

.result-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: #10b981;
}

.result-item.total .result-value {
  font-size: 1.75rem;
  color: #059669;
}

.result-note {
  margin-top: 1rem;
  padding: 1rem;
  background: white;
  border-radius: 8px;
  font-size: 0.875rem;
  color: #64748b;
  display: flex;
  gap: 0.5rem;
  align-items: start;
}

.result-note i {
  color: #3b82f6;
  margin-top: 0.125rem;
}

@media (max-width: 768px) {
  .rot-calculator-widget {
    margin: 1rem;
    padding: 1.5rem 1rem;
  }
  
  .calculator-box {
    padding: 1.5rem;
  }
  
  .result-value {
    font-size: 1.25rem;
  }
  
  .result-item.total .result-value {
    font-size: 1.5rem;
  }
}

/* ========== IMPORTANT LINKS SECTION ========== */
.important-links-section {
  max-width: 1200px;
  margin: 3rem auto;
  padding: 2rem 1.5rem;
  background: white;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.important-links-section h2 {
  font-size: 1.75rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 0.5rem;
  text-align: center;
}

.links-intro {
  text-align: center;
  color: #64748b;
  margin-bottom: 2rem;
}

.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.link-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem 1.5rem;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  text-decoration: none;
  transition: all 0.3s;
  background: white;
}

.link-card:hover {
  transform: translateY(-4px);
  border-color: #f59e0b;
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.2);
}

.link-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.link-card h3 {
  font-size: 1.125rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.5rem;
}

.link-card p {
  font-size: 0.875rem;
  color: #64748b;
  margin: 0;
}

@media (max-width: 768px) {
  .important-links-section {
    margin: 1rem;
    padding: 1.5rem 1rem;
  }
  
  .links-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
  }
  
  .link-card {
    padding: 1.5rem 1rem;
  }
  
  .link-icon {
    font-size: 2.5rem;
  }
}

/* ========== HERO (Unsplash skog – Emilia Niedźwiedzka, photo-1567891809331) ========== */
.knowledge-hero-banner {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: var(--radius-xl, 1rem);
  margin: calc(var(--header-height, 72px) + 28px) auto 2rem;
  padding: 3rem 1.5rem 2rem;
  max-width: 1400px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.08);
}

.knowledge-hero-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background-color: #e8edf2;
  background-image: url('/images/knowledge-center-hero-bg.jpg');
  background-size: cover;
  background-position: center center;
  filter: grayscale(100%);
  border-radius: inherit;
  z-index: 0;
}

.knowledge-hero-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    105deg,
    rgba(248, 250, 252, 0.94) 0%,
    rgba(248, 250, 252, 0.82) 38%,
    rgba(248, 250, 252, 0.48) 62%,
    rgba(248, 250, 252, 0.18) 100%
  );
  z-index: 1;
}

.knowledge-hero-heading {
  position: relative;
  z-index: 2;
  text-align: center;
  margin-bottom: 1.25rem;
}

.knowledge-hero-title {
  font-size: clamp(1.625rem, 4vw, 2.35rem);
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 0.5rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.9);
}

.knowledge-hero-title i {
  color: #0f172a;
  font-size: 1.1em;
}

.knowledge-hero-lead {
  font-size: 1.125rem;
  color: #475569;
  margin: 0;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.9);
}

.knowledge-hero-banner .knowledge-search-section {
  position: relative;
  z-index: 2;
  margin: 0 auto 0;
  padding: 0 1.5rem;
}

.knowledge-hero-banner .search-bar-large {
  margin-top: 0;
  margin-bottom: 1.25rem;
}

/* ========== KNOWLEDGE SEARCH SECTION ========== */
.knowledge-search-section {
  max-width: 800px;
  margin: 0 auto 3rem;
  padding: 0 1.5rem;
}

.knowledge-search-section .search-bar-large {
  margin: 0 auto 1.5rem;
}

.knowledge-search-section .popular-searches {
  text-align: center;
}

/* Search Bar */
.search-bar-large {
  max-width: 600px;
  margin: 2rem auto;
  background: white;
  border-radius: 50px;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.search-bar-large i {
  padding: 0 1rem;
  color: #64748b;
  font-size: 1.25rem;
}

.search-bar-large input {
  flex: 1;
  border: none;
  padding: 1rem 0.5rem;
  font-size: 1.125rem;
  color: #333;
  background: transparent;
}

.search-bar-large input:focus {
  outline: none;
}

.search-bar-large button {
  background: linear-gradient(135deg, #f59e0b, #ec4899);
  color: white;
  border: none;
  padding: 1rem 2rem;
  border-radius: 50px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.search-bar-large button:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.search-bar-large button:active {
  transform: scale(0.98);
}

/* Popular Searches */
.popular-searches {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.875rem;
}

.popular-searches span {
  color: #64748b;
  font-weight: 600;
}

.popular-searches a {
  color: white;
  text-decoration: none;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, #1e293b, #334155);
  border-radius: 20px;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(30, 41, 59, 0.2);
}

.popular-searches a:hover {
  background: linear-gradient(135deg, #334155, #475569);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 41, 59, 0.3);
}

/* ========== MAIN CONTAINER ========== */
.knowledge-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  padding-bottom: calc(100px + env(safe-area-inset-bottom));
}

.section-title {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  color: #0f172a;
}

/* ========== CATEGORIES GRID ========== */
.categories-section {
  margin-bottom: 4rem;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.75rem;
}

.category-pill {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  background: #f8fafc;
  border-radius: 10px;
  border: 2px solid #e2e8f0;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: none;
}

.category-pill:hover {
  background: white;
  border-color: #cbd5e1;
  transform: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.category-pill:active {
  transform: scale(0.99);
}

.category-pill.active {
  background: white;
  border-color: #1e293b;
  box-shadow: 0 2px 12px rgba(30, 41, 59, 0.12);
}

.category-icon {
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
  opacity: 0.9;
}

.category-pill.active .category-icon {
  opacity: 1;
}

.category-content {
  flex: 1;
}

.category-content h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 0.125rem;
  color: #334155;
}

.category-pill.active .category-content h3 {
  color: #0f172a;
  font-weight: 700;
}

.category-content p {
  font-size: 0.75rem;
  color: #64748b;
  margin-bottom: 0.25rem;
}

.article-count {
  font-size: 0.6875rem;
  color: #94a3b8;
  font-weight: 500;
}

.category-pill i.fa-chevron-right {
  color: #cbd5e1;
  font-size: 0.875rem;
}

.category-pill.active i.fa-chevron-right {
  color: #64748b;
}

/* ========== ARTICLES LIST ========== */
.featured-section,
.all-articles-section {
  margin-bottom: 4rem;
}

.articles-list {
  display: grid;
  gap: 1.5rem;
}

.article-card {
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  cursor: pointer;
  transition: all 0.3s;
  border: 2px solid transparent;
}

.article-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  border-color: #f59e0b;
}

.article-category-tag {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  background: #f3f4f6;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: #64748b;
}

.article-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #0f172a;
  line-height: 1.3;
}

.article-summary {
  font-size: 0.938rem;
  color: #64748b;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
  color: #94a3b8;
  flex-wrap: wrap;
}

.article-meta i {
  margin-right: 0.25rem;
}

/* ========== SEARCH RESULTS ========== */
.search-results {
  margin-top: 3rem;
  margin-bottom: 3rem;
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #e2e8f0;
  flex-wrap: wrap;
  gap: 1rem;
}

.breadcrumb-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.breadcrumb-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #1e293b;
  text-decoration: none;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.2s;
  background: #f1f5f9;
}

.breadcrumb-link:hover {
  background: #e2e8f0;
  transform: translateX(-2px);
}

.breadcrumb-separator {
  color: #94a3b8;
  font-weight: 300;
}

.results-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: #0f172a;
  font-weight: 700;
}

.btn-text {
  background: transparent;
  border: none;
  color: #64748b;
  cursor: pointer;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.2s;
}

.btn-text:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.no-results {
  text-align: center;
  padding: 3rem 1.5rem;
}

.no-results i {
  font-size: 4rem;
  color: #cbd5e1;
  margin-bottom: 1rem;
}

.no-results h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #0f172a;
}

.no-results p {
  color: #64748b;
}

/* ========== MOBILE OPTIMIZATIONS ========== */
@media (max-width: 768px) {
  .knowledge-hero-banner {
    margin-top: 80px;
    padding: 2rem 1rem 1.5rem !important;
    border-radius: 12px !important;
  }

  .knowledge-hero-title {
    font-size: 1.5rem !important;
  }

  .knowledge-search-section {
    padding: 0 1rem;
  }

  .search-bar-large {
    flex-direction: column;
    border-radius: 16px;
    gap: 0.5rem;
    padding: 0.75rem;
  }

  .search-bar-large i {
    display: none;
  }

  .search-bar-large input {
    padding: 0.75rem;
    font-size: 1rem;
  }

  .search-bar-large button {
    width: 100%;
    border-radius: 12px;
    padding: 0.875rem 1.5rem;
  }

  .popular-searches {
    font-size: 0.813rem;
  }

  .knowledge-container {
    padding: 2rem 1rem;
    padding-bottom: calc(100px + env(safe-area-inset-bottom));
  }

  .section-title {
    font-size: 1.375rem;
  }

  .categories-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .category-pill {
    padding: 0.75rem;
  }

  .category-icon {
    font-size: 1.375rem;
  }

  .article-card {
    padding: 1.25rem;
  }

  .article-card h3 {
    font-size: 1.125rem;
  }

  .results-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .breadcrumb-nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .breadcrumb-separator {
    display: none;
  }
}

@media (max-width: 480px) {
  .page-header {
    padding: 1.5rem 1rem !important;
  }

  .page-header h1 {
    font-size: 1.5rem !important;
  }

  .knowledge-container {
    padding: 1.5rem 1rem;
  }

  .category-pill {
    padding: 0.625rem 0.75rem;
    gap: 0.625rem;
  }

  .category-icon {
    font-size: 1.25rem;
  }

  .category-content h3 {
    font-size: 0.875rem;
  }

  .category-content p {
    font-size: 0.6875rem;
  }

  .article-card {
    padding: 1rem;
  }
}

/* ========== LOADING STATE ========== */
.loading-state {
  text-align: center;
  padding: 3rem 1rem;
  color: #64748b;
  font-size: 1.125rem;
}

.loading-state i {
  margin-right: 0.5rem;
  color: #1e293b;
}

.loading-skeleton {
  animation: skeleton-loading 1s linear infinite alternate;
}

@keyframes skeleton-loading {
  0% {
    background-color: #f3f4f6;
  }
  100% {
    background-color: #e5e7eb;
  }
}

.skeleton-card {
  height: 150px;
  border-radius: 16px;
}
