/* Knowledge Base Page Styles */

/* Page Breadcrumb */
.page-breadcrumb {
  background: linear-gradient(135deg, #5e1e28 0%, #822b39 100%);
  padding: 12px 40px;
  border-bottom: none;
}

.breadcrumb-container {
  max-width: 1200px;
  margin: 0 auto;
}

.breadcrumb-list {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 13px;
}

.breadcrumb-item {
  display: flex;
  align-items: center;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: '\f054';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 9px;
  color: rgba(255, 255, 255, 0.4);
  margin: 0 12px;
}

.breadcrumb-item a {
  color: rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s ease;
  font-weight: 400;
  letter-spacing: 0.3px;
}

.breadcrumb-item a i {
  font-size: 12px;
}

.breadcrumb-item a:hover {
  color: #f5c143;
  text-decoration: none;
}

.breadcrumb-item.active span {
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.3px;
}

/* Page Hero Banner */
.page-hero {
  position: relative;
  height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.page-hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  z-index: 1;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}

.page-hero-bg.active {
  opacity: 1;
}

.page-hero-bg::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(94, 30, 40, 0.92) 0%, rgba(130, 43, 57, 0.88) 50%, rgba(153, 27, 53, 0.85) 100%);
}

.page-hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: white;
  max-width: 800px;
  padding: 0 20px;
}

.hero-label {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: #f5c143;
  margin-bottom: 12px;
  animation: fadeInUp 0.6s ease-out;
}

.page-hero-content h1 {
  font-size: 44px;
  font-weight: 800;
  margin-bottom: 0;
  text-transform: uppercase;
  letter-spacing: 2px;
  line-height: 1.2;
  animation: fadeInUp 0.8s ease-out;
}

.hero-divider {
  width: 60px;
  height: 3px;
  background: #f5c143;
  margin: 16px auto;
  border-radius: 2px;
  animation: fadeInUp 0.8s ease-out 0.15s both;
}

.page-hero-content p {
  font-size: 17px;
  font-weight: 300;
  line-height: 1.6;
  opacity: 0.92;
  max-width: 600px;
  margin: 0 auto;
  animation: fadeInUp 0.8s ease-out 0.3s both;
}

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

/* Knowledge Base Content */
.kb-content {
  background: #f5f5f5;
  padding: 60px 0 80px;
  min-height: 100vh;
}

.kb-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

/* Toolbar */
.kb-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
}

.kb-search {
  flex: 1;
  max-width: 500px;
  position: relative;
}

.kb-search i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
  font-size: 14px;
}

.kb-search input {
  width: 100%;
  padding: 14px 18px 14px 44px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  background: white;
  transition: all 0.3s ease;
  font-family: inherit;
}

.kb-search input:focus {
  outline: none;
  border-color: #822b39;
  box-shadow: 0 0 0 3px rgba(130, 43, 57, 0.1);
}

.kb-view-toggle {
  display: flex;
  gap: 4px;
  background: white;
  padding: 4px;
  border-radius: 8px;
  border: 2px solid #e0e0e0;
}

.view-btn {
  padding: 10px 14px;
  border: none;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  color: #999;
  font-size: 16px;
  transition: all 0.2s ease;
}

.view-btn.active {
  background: #822b39;
  color: white;
}

.view-btn:hover:not(.active) {
  background: #f5f5f5;
  color: #822b39;
}

/* Category Navigation */
.kb-category-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 40px;
  padding-bottom: 25px;
  border-bottom: 2px solid #e0e0e0;
}

.kb-cat-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border: 2px solid #e0e0e0;
  background: white;
  border-radius: 25px;
  font-size: 13px;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.kb-cat-btn i {
  font-size: 13px;
  color: #999;
  transition: color 0.3s ease;
}

.kb-cat-btn:hover {
  border-color: #f5c143;
  color: #822b39;
}

.kb-cat-btn:hover i {
  color: #f5c143;
}

.kb-cat-btn.active {
  background: #822b39;
  border-color: #822b39;
  color: white;
}

.kb-cat-btn.active i {
  color: #f5c143;
}

/* Catalogues */
.kb-catalogues {
  display: flex;
  flex-direction: column;
  gap: 35px;
}

@keyframes fadeInCatalogue {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.kb-catalogue {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  border: 1px solid #e8e8e8;
}

/* Catalogue Header */
.catalogue-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 25px 30px;
  background: linear-gradient(135deg, #fafafa 0%, #ffffff 100%);
  border-bottom: 2px solid #f5c143;
}

.catalogue-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #822b39 0%, #991b35 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.catalogue-icon i {
  font-size: 22px;
  color: white;
}

.catalogue-info {
  flex: 1;
}

.catalogue-info h2 {
  font-size: 20px;
  font-weight: 700;
  color: #333;
  margin: 0 0 4px;
  line-height: 1.3;
}

.catalogue-info p {
  font-size: 13px;
  color: #888;
  margin: 0;
  line-height: 1.4;
}

.catalogue-count {
  background: #fef9e7;
  color: #822b39;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  border: 1px solid #f5c143;
}

/* Document Cards */
.catalogue-items {
  padding: 20px 30px 25px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.doc-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 20px;
  background: #fafafa;
  border-radius: 8px;
  border: 1px solid #f0f0f0;
  transition: all 0.3s ease;
}

.doc-card:hover {
  background: #fff;
  border-color: #e0e0e0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  transform: translateX(4px);
}

.doc-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.doc-icon i {
  font-size: 22px;
}

.doc-icon.pdf {
  background: #fdecea;
}

.doc-icon.pdf i {
  color: #e74c3c;
}

.doc-icon.doc {
  background: #e8f0fe;
}

.doc-icon.doc i {
  color: #2b5797;
}

.doc-details {
  flex: 1;
  min-width: 0;
}

.doc-details h4 {
  font-size: 15px;
  font-weight: 600;
  color: #333;
  margin: 0 0 4px;
  line-height: 1.3;
}

.doc-details p {
  font-size: 13px;
  color: #888;
  margin: 0 0 8px;
  line-height: 1.4;
}

.doc-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.doc-meta span {
  font-size: 11px;
  color: #aaa;
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 500;
}

.doc-meta span i {
  font-size: 10px;
  color: #ccc;
}

.doc-download {
  width: 42px;
  height: 42px;
  background: #822b39;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.3s ease;
  text-decoration: none;
}

.doc-download i {
  font-size: 16px;
  color: white;
}

.doc-download:hover {
  background: #f5c143;
  transform: scale(1.08);
}

.doc-download:hover i {
  color: #222;
}

/* List View */
.kb-catalogues.list-view .doc-card {
  border-radius: 0;
  border-left: 3px solid transparent;
  background: white;
  border-bottom: 1px solid #f0f0f0;
  padding: 14px 20px;
}

.kb-catalogues.list-view .doc-card:hover {
  border-left-color: #f5c143;
  transform: none;
}

.kb-catalogues.list-view .catalogue-items {
  gap: 0;
  padding: 10px 30px 20px;
}

.kb-catalogues.list-view .doc-icon {
  width: 36px;
  height: 36px;
}

.kb-catalogues.list-view .doc-icon i {
  font-size: 18px;
}

.kb-catalogues.list-view .doc-details p {
  display: none;
}

.kb-catalogues.list-view .doc-download {
  width: 36px;
  height: 36px;
}

.kb-catalogues.list-view .doc-download i {
  font-size: 14px;
}

/* Stats Summary */
.kb-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 50px;
}

.kb-stat-item {
  background: white;
  padding: 30px 20px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  border-top: 3px solid #f5c143;
}

.kb-stat-number {
  display: block;
  font-size: 36px;
  font-weight: 800;
  color: #822b39;
  line-height: 1;
  margin-bottom: 8px;
}

.kb-stat-label {
  font-size: 12px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

/* Responsive */
@media (max-width: 968px) {
  .page-hero {
    height: 300px;
  }

  .page-hero-content h1 {
    font-size: 34px;
  }

  .page-hero-content p {
    font-size: 15px;
  }

  .hero-label {
    font-size: 12px;
    letter-spacing: 2px;
  }

  .kb-category-nav {
    gap: 6px;
  }

  .kb-cat-btn {
    padding: 8px 14px;
    font-size: 12px;
  }

  .catalogue-header {
    flex-wrap: wrap;
    padding: 20px;
  }

  .catalogue-items {
    padding: 15px 20px 20px;
  }

  .kb-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .page-hero {
    height: 280px;
  }

  .page-hero-content h1 {
    font-size: 26px;
    letter-spacing: 1px;
  }

  .page-hero-content p {
    font-size: 14px;
  }

  .hero-label {
    font-size: 11px;
    letter-spacing: 2px;
  }

  .hero-divider {
    width: 45px;
    margin: 12px auto;
  }

  .kb-wrapper {
    padding: 0 20px;
  }

  .kb-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .kb-search {
    max-width: none;
  }

  .kb-view-toggle {
    align-self: flex-end;
  }

  .kb-cat-btn span {
    display: none;
  }

  .kb-cat-btn {
    padding: 10px 12px;
    border-radius: 8px;
  }

  .kb-cat-btn i {
    font-size: 16px;
  }

  .doc-card {
    flex-wrap: wrap;
    gap: 12px;
    padding: 15px;
  }

  .doc-details h4 {
    font-size: 14px;
  }

  .doc-meta {
    gap: 10px;
  }

  .catalogue-header {
    padding: 15px;
    gap: 12px;
  }

  .catalogue-icon {
    width: 40px;
    height: 40px;
  }

  .catalogue-icon i {
    font-size: 18px;
  }

  .catalogue-info h2 {
    font-size: 17px;
  }

  .catalogue-count {
    font-size: 11px;
    padding: 4px 10px;
  }

  .catalogue-items {
    padding: 12px 15px 18px;
  }

  .kb-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .kb-stat-item {
    padding: 20px 15px;
  }

  .kb-stat-number {
    font-size: 28px;
  }
}
