/* ========================================
   Dataset Search Page - Complete Redesign
   ======================================== */

/* Page Header - No Background */
.dataset-page-header {
  background: transparent;
  padding: 2rem 0 1rem 0;
  position: relative;
  margin-bottom: 0;
}

.dataset-page-header .container {
  position: relative;
  z-index: 1;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 15px;
}

.dataset-page-title {
  font-size: 2rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.dataset-page-title i {
  font-size: 1.75rem;
  color: #6253e8;
}

.dataset-page-subtitle {
  font-size: 1rem;
  color: #6b7280;
  margin: 0;
}

/* Main Content Area - Fullwidth Background */
.main {
  background: #ffffff !important;
  width: 100vw !important;
  margin-left: calc(-50vw + 50%) !important;
  margin-right: calc(-50vw + 50%) !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  padding-top: 2rem !important;
}

.main .container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Primary Content */
.primary {
  background: transparent !important;
  padding: 0 !important;
  border: none !important;
  box-shadow: none !important;
}

.dataset-search-wrapper {
  background: transparent;
  padding: 0;
  margin-bottom: 2rem;
}

/* Secondary Content - Filters */
.secondary {
  background: transparent !important;
  padding: 0 !important;
  border: none !important;
  box-shadow: none !important;
}

.dataset-filters-wrapper {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.5rem;
  position: sticky;
  top: 20px;
}

/* Search Form */
.search-input-group input {
  border-radius: 8px 0 0 8px !important;
  border-right: none !important;
}

.search-input-group button {
  background: #6253e8 !important;
  border: none !important;
  border-radius: 0 8px 8px 0 !important;
  padding: 0.75rem 1.5rem !important;
  color: white !important;
}

.search-input-group button:hover {
  background: #5144d3 !important;
}

.control-order-by select {
  border-radius: 6px !important;
}

/* Dataset List */
.dataset-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.dataset-item {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1.75rem;
  margin-bottom: 1rem;
  transition: all 0.2s ease;
  position: relative;
}

.dataset-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #6253e8;
  border-radius: 8px 0 0 8px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.dataset-item:hover {
  border-color: #6253e8;
  background: #fafbff;
}

.dataset-item:hover::before {
  opacity: 1;
}

.dataset-heading {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
}

.dataset-heading a {
  color: #1f2937;
  text-decoration: none;
  transition: color 0.2s ease;
}

.dataset-heading a:hover {
  color: #6253e8;
}

.dataset-notes {
  color: #6b7280;
  font-size: 1rem;
  line-height: 1.7;
  margin: 0 0 1rem 0;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.375rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid #e5e7eb;
}

.pagination li {
  list-style: none;
}

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 0.875rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  color: #4b5563;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  background: white;
  font-size: 0.9375rem;
}

.pagination a:hover {
  border-color: #6253e8;
  color: #6253e8;
  background: #fafbff;
}

.pagination .active span {
  background: #6253e8;
  color: white;
  border-color: #6253e8;
}

/* Filters Sidebar */
.filters {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
}

.filters h2 {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 1.25rem;
}

.filters .module {
  background: transparent;
  border: none;
  margin-bottom: 1.5rem;
  padding: 0;
}

.filters .module-heading {
  background: #1f2937;
  color: white;
  padding: 0.625rem 0.875rem;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.filters .module-content {
  padding: 0;
}

.filters nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.filters nav li {
  margin-bottom: 0.375rem;
}

.filters nav li a {
  display: block;
  padding: 0.5rem 0.75rem;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  color: #4b5563;
  text-decoration: none;
  transition: all 0.2s ease;
  font-size: 0.875rem;
}

.filters nav li a:hover {
  background: #fafbff;
  border-color: #6253e8;
  color: #6253e8;
}

.filters nav li.active a {
  background: #6253e8;
  color: white;
  border-color: #6253e8;
  font-weight: 600;
}

/* API Info Section */
.api-info-section {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1.25rem;
  margin-top: 2rem;
}

.api-info-section .module-content {
  padding: 0;
}

.api-info-section small {
  color: #6b7280;
  font-size: 0.875rem;
  line-height: 1.6;
}

.api-info-section a {
  color: #6253e8;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

.api-info-section a:hover {
  color: #5144d3;
  text-decoration: underline;
}

/* Module Overrides */
.module {
  background: transparent;
  border: none;
  box-shadow: none;
  margin-bottom: 0;
}

.module-content {
  padding: 0;
}

/* Empty State */
.module-content.empty,
p.empty {
  color: #9ca3af;
  font-style: italic;
  padding: 2rem;
  text-align: center;
  background: #fafafa;
  border-radius: 8px;
  border: 1px dashed #d1d5db;
}

/* Responsive Design */
@media (max-width: 992px) {
  .dataset-page-header {
    padding: 1.5rem 0 1rem 0;
  }

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

  .dataset-page-title i {
    font-size: 1.5rem;
  }

  .dataset-search-wrapper {
    padding: 1.5rem;
  }

  .dataset-filters-wrapper {
    position: static;
    margin-top: 2rem;
  }
}

@media (max-width: 768px) {
  .dataset-page-header {
    padding: 1.25rem 0 0.75rem 0;
  }

  .dataset-page-title {
    font-size: 1.5rem;
    gap: 0.625rem;
  }

  .dataset-page-title i {
    font-size: 1.375rem;
  }

  .dataset-page-subtitle {
    font-size: 0.9375rem;
  }

  .dataset-search-wrapper {
    padding: 1.25rem;
    border-radius: 12px;
  }

  .dataset-filters-wrapper {
    padding: 1.25rem;
    border-radius: 12px;
  }

  .dataset-item {
    padding: 1.5rem;
    border-radius: 12px;
  }

  .dataset-heading {
    font-size: 1.25rem;
  }
}

@media (max-width: 480px) {
  .dataset-page-header {
    padding: 1rem 0 0.5rem 0;
  }

  .dataset-page-title {
    font-size: 1.375rem;
    gap: 0.5rem;
  }

  .dataset-page-title i {
    font-size: 1.125rem;
  }

  .dataset-page-subtitle {
    font-size: 0.875rem;
  }

  .dataset-search-wrapper {
    padding: 1rem;
    border-radius: 10px;
  }

  .dataset-filters-wrapper {
    padding: 1rem;
    border-radius: 10px;
  }

  .dataset-item {
    padding: 1.25rem;
    border-radius: 10px;
  }

  .dataset-heading {
    font-size: 1.125rem;
  }

  .pagination a,
  .pagination span {
    min-width: 36px;
    height: 36px;
    padding: 0 0.625rem;
    font-size: 0.875rem;
  }
}
