/**
 * Knowledge Hub Component Styles
 * Based on screenshot design with tabs and icon-based cards
 */
.knowledge-hub-section .container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0;
}

/* Header Section */
.knowledge-hub-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}

.kb-bullet {
  font-size: 1.8rem;
  color: #000;
  line-height: 1;
}

.kb-title {
  text-transform: uppercase;
  font-size: 20px;
  color: #000;
  font-weight: 500;
  color: #000;
  margin: 0;
}

.kb-subtitle-wrapper {
  margin-bottom: 10px;
}

.kb-subtitle {
  font-size: 36px;
  font-weight: 500;
  line-height: 1.3;
  color: #000;
  margin: 0;
}

/* Tabs Navigation */
.kb-tabs-container {
  margin-top: 20px;
}

.kb-tabs-navigation {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.kb-tab-button {
  padding: 0 20px;
  background: #f2f2f2;
  border: 0;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 500;
  color: #666;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.kb-tab-button:hover {
  background: #e8e8e8;
  color: #000;
}

.kb-tab-button.active {
  background: #333;
  color: #fff;
}

/* Tab Content */
.kb-tabs-content {
  position: relative;
  padding: 20px;
  background-color: #f2f2f2;
  border-radius: 20px;
}

.kb-tab-panel {
  display: none;
}

.kb-tab-panel.active {
  display: block;
}

/* Cards Grid - Horizontal Layout */
.kb-cards-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
  padding: 0;
  margin-bottom: 20px;
}

/* Individual Card */
.kb-card {
  background: var(--taevas-blue);
  border-radius: 20px;
  padding: 40px 20px;
  text-align: center;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

.kb-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 40px rgba(107, 70, 193, 0.3);
}

.kb-card-icon {
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 25px;
}

.kb-card-icon img {
  width: 150px;
  height: 150px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.kb-card-icon .kb-default-icon {
  width: 150px;
  height: 150px;
  color: rgba(255, 255, 255, 0.9);
}

.kb-card-title {
  font-size: 1rem;
  font-weight: 500;
  color: #fff;
  margin: 0;
  line-height: 1.4;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.kb-card-description {
  display: none;
}

/* Clickable card link styling */
a.kb-card-link {
  color: inherit;
  text-decoration: none;
}

a.kb-card-link .kb-card-title {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* CTA Button */
.kb-cta-wrapper {
  text-align: center;
}

.kb-cta-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px;
  background: #333;
  color: #fff;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
}

.kb-cta-button:hover {
  background: #000;
  gap: 18px;
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  color: #fff;
}

.kb-cta-button i {
  font-size: 1rem;
  transition: transform 0.3s ease;
}

.kb-cta-button:hover i {
  transform: translateX(5px);
}

/* No Items / No Tabs States */
.kb-no-items,
.kb-no-tabs {
  text-align: center;
  padding: 80px 20px;
  color: #999;
  font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 1400px) {
  .kb-cards-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (max-width: 1200px) {
  .kb-cards-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 991px) {
  .kb-subtitle {
    font-size: 2.5rem;
  }

  .kb-cards-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
  }

  .kb-card {
    padding: 30px 15px;
  }

  .kb-card-icon {
    width: 80px;
    height: 80px;
  }

  .kb-card-title {
    font-size: 1.1rem;
  }

  .kb-tabs-navigation {
    gap: 10px;
  }

  .kb-tab-button {
    padding: 12px 28px;
    font-size: 1rem;
  }
}

@media (max-width: 768px) {
  .kb-subtitle h2{
    font-size: 1.5rem;
  }

  .kb-cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 15px;
  }

  .kb-card {
    padding: 30px 15px;
    border-radius: 15px;
  }

  .kb-card-icon {
    width: 70px;
    height: 70px;
    margin-bottom: 20px;
  }

  .kb-card-title {
    font-size: 1rem;
  }

  .kb-tabs-navigation {
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    margin-bottom: 20px;
  }

  .kb-tabs-navigation::-webkit-scrollbar {
    display: none;
  }

  .kb-tab-button {
    padding: 0 25px;
    font-size: 1rem;
  }

  .kb-cta-button {
    padding: 0px 20px;
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .kb-title {
    font-size: 0.8rem;
  }

  .kb-subtitle h2{
    font-size: 1.5rem;
  }

  .kb-cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 15px;
  }

  .kb-card {
    padding: 25px 12px;
    border-radius: 12px;
  }

  .kb-card-icon {
    width: 65px;
    height: 65px;
    margin-bottom: 18px;
  }

  .kb-card-title {
    font-size: 0.9rem;
    line-height: 1.3;
  }

  .kb-tab-button {
    padding: 0px 10px;
    font-size: 0.85rem;
  }

  .kb-cta-button {
    width: 100%;
    justify-content: center;
    padding: 0px 25px;
    font-size: 0.95rem;
  }
}

/* Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.kb-card {
  animation: fadeInUp 0.6s ease forwards;
}

.kb-card:nth-child(1) { animation-delay: 0.05s; }
.kb-card:nth-child(2) { animation-delay: 0.1s; }
.kb-card:nth-child(3) { animation-delay: 0.15s; }
.kb-card:nth-child(4) { animation-delay: 0.2s; }
.kb-card:nth-child(5) { animation-delay: 0.25s; }
.kb-card:nth-child(6) { animation-delay: 0.3s; }
