/* --- Upgraded Table View Styling for Datasets --- */
.datasets-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 16px;
  margin: 0 auto;
  background: transparent;
}

.datasets-table th, .datasets-table td {
  background: #fff;
  border: none;
  padding: 18px 20px;
  vertical-align: middle;
  font-size: 1rem;
  box-shadow: 0 2px 8px 0 rgba(0,0,0,0.04);
}

.datasets-table th {
  color: #444;
  font-weight: 700;
  background: #f7f7f9;
  border-bottom: 2px solid #e0e0e0;
  text-align: left;
  font-size: 1.05rem;
}

.datasets-table tr {
  border-radius: 16px;
  transition: box-shadow 0.2s, background 0.2s;
}

.datasets-table tr:hover td {
  background: #f5f8fa;
  box-shadow: 0 4px 16px 0 rgba(0,0,0,0.08);
}

.datasets-table td:first-child {
  border-radius: 16px 0 0 16px;
}
.datasets-table td:last-child {
  border-radius: 0 16px 16px 0;
}

.datasets-table .dataset-link {
  font-weight: 700;
  color: #1a3a5d;
  text-decoration: none;
  font-size: 1.08rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.datasets-table .dataset-link:hover {
  text-decoration: underline;
}

.datasets-table .dataset-description {
  color: #555;
  font-size: 0.98rem;
  line-height: 1.5;
}

.datasets-table .dataset-formats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.datasets-table .format-badge {
  background: #e3eafc;
  color: #1a3a5d;
  border-radius: 12px;
  padding: 2px 10px;
  font-size: 0.92rem;
  font-weight: 500;
}

.datasets-table .dataset-actions {
  display: flex;
  gap: 8px;
}
.datasets-table .action-btn {
  background: #f0f1f5;
  color: #1a3a5d;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 0.97rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  transition: background 0.15s;
}
.datasets-table .action-btn:hover {
  background: #e3eafc;
}

/* Download badge for table view */
.datasets-table .download-badge {
  display: inline-flex;
  align-items: center;
  background: #f5f7fa;
  color: #1a3a5d;
  border-radius: 16px;
  font-size: 0.97rem;
  font-weight: 600;
  padding: 3px 12px 3px 8px;
  margin-left: 0;
  gap: 6px;
  box-shadow: 0 1px 4px 0 rgba(0,0,0,0.04);
}
.datasets-table .download-badge svg {
  margin-right: 4px;
  color: #6c757d;
}

/* Dataset Row Card Styling - Compressed and styled to match page */
.dataset-row-card {
  display: flex;
  background: #fff;
  border: 1px solid #e0e6ed;
  border-radius: 16px;
  margin-bottom: 12px;
  padding: 16px 20px;
  gap: 20px;
  transition: all 0.2s ease;
  cursor: pointer;
  box-shadow: 0 2px 8px 0 rgba(0,0,0,0.04);
  min-height: 112px;
  align-items: center;
}

.dataset-row-card:hover {
  box-shadow: 0 4px 16px 0 rgba(0,0,0,0.08);
  transform: translateY(-1px);
  background: #f5f8fa;
}

.dataset-row-image {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border-radius: 12px;
  overflow: hidden;
  background: #f0f2f5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dataset-row-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dataset-row-content {
  flex: 1;
  display: grid;
  grid-template-columns: 2fr 2fr 1fr auto;
  gap: 24px;
  align-items: center;
  min-height: 80px;
}

.dataset-row-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dataset-row-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.2;
  color: #1a3a5d;
}

.dataset-row-org {
  font-size: 0.9rem;
  color: #666;
  font-weight: 500;
  margin-top: 2px;
}

.dataset-row-desc {
  color: #555;
  font-size: 0.95rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dataset-row-tags {
  font-size: 0.9rem;
  color: #666;
  line-height: 1.2;
}

.dataset-row-downloads {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  font-size: 0.9rem;
  color: #666;
}

.dataset-row-downloads .card-downloads {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
  color: #666;
  font-weight: 500;
}

.dataset-row-downloads svg {
  color: #6c757d;
}
/* CSS für Datensatz-Listenansicht */

/* Modern Header Section */
.modern-header {
  background: #ffffff;
  padding: 2rem 0 3rem 0;
  margin-bottom: 2rem;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.header-text h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 1rem 0 0.5rem 0;
}

.header-text .subtitle {
  font-size: 1.1rem;
  color: #666;
  margin: 0;
}

/* Controls Section */
.controls-wrapper {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  position: relative;
  z-index: 100;
}

.controls-wrapper.fixed {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 999;
}

.controls-card {
  background: transparent;
  border-radius: 0;
  padding: 2rem;
  margin-bottom: 0;
  box-shadow: none;
  border: none;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  transition: all 0.3s ease;
}

.controls-wrapper.fixed,
.controls-wrapper.sticky {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.search-input-wrapper {
  position: relative;
  flex: 1;
  margin-right: 1rem;
}

.modern-search {
  width: 100%;
  padding: 0.875rem 1rem 0.875rem 2.75rem;
  font-size: 0.95rem;
  border: none;
  border-radius: 25px;
  background: #f8f9fa;
  transition: all 0.2s ease;
}

.modern-search:focus {
  outline: none;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(8, 146, 137, 0.1);
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #666;
  pointer-events: none;
}

.search-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  padding: 0.75rem;
  margin-top: 0.5rem;
  display: none;
  z-index: 1001;
  border: 1px solid #e9ecef;
}

.search-suggestions.show {
  display: block;
}



.suggestion-tag {
  display: inline-block;
  background: #f8f9fa;
  color: #333;
  padding: 0.375rem 0.75rem;
  margin: 0.125rem;
  border-radius: 15px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.suggestion-tag:hover {
  background: #089289;
  color: #ffffff;
}

.controls-row {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.category-row {
  margin-top: 0;
  display: flex;
  align-items: center;
}

.category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.control-label {
  display: none;
}

.modern-select {
  padding: 0.875rem 2.5rem 0.875rem 1rem;
  border: none;
  border-radius: 50px;
  background: #f8f9fa;
  font-size: 0.95rem;
  min-width: 140px;
  cursor: pointer;
  transition: all 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 16px;
  color: #333;
  font-weight: 500;
}

.modern-select:focus {
  outline: none;
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(8, 146, 137, 0.1);
}

.modern-select:hover {
  background-color: #e9ecef;
}

.modern-select:focus:hover {
  background-color: #ffffff;
}

.view-toggle-switch {
  display: flex;
  background: #f8f9fa;
  border-radius: 25px;
  padding: 2px;
  gap: 0;
}

.toggle-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 36px;
  border: none;
  border-radius: 23px;
  background: transparent;
  color: #666;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.toggle-icon-btn:hover:not(.active) {
  color: #333;
}

.toggle-icon-btn.active {
  background: #fff;
  color: #089289;
  border: 1px solid #089289;
  transform: none;
}

.toggle-icon-btn svg {
  stroke-width: 2;
  transition: all 0.2s ease;
}

.toggle-icon-btn.active svg {
  transform: none;
}

/* Filters Section */
/* Category filter buttons - now part of controls */
.category-filters .filter-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border: 1px solid #e1e5e9;
  border-radius: 50px;
  background: #ffffff;
  color: #333;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
  white-space: nowrap;
  vertical-align: middle;
}

.category-filters .filter-tag:hover {
  background: #f8f9fa;
  border-color: #089289;
  color: #089289;
}

.category-filters .filter-tag.active {
  background: #089289;
  border-color: #089289;
  color: #ffffff;
}



/* Breadcrumb Navigation */
.breadcrumb-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #666;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.breadcrumb-link {
  color: #089289;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.breadcrumb-link:hover {
  color: #066f6a;
}

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

.breadcrumb-current {
  color: #333;
  font-weight: 600;
}

/* Datasets Header */
.datasets-header {
  margin-bottom: 2rem;
  text-align: center;
}

.datasets-header h1 {
  margin-bottom: 0.5rem;
}

.datasets-subtitle {
  font-size: 1.1rem;
  color: #666;
  margin-bottom: 1rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}

.back-to-recommendations {
  display: inline-block;
  color: #07A299;
  text-decoration: none;
  font-size: 0.95rem;
  padding: 0.5rem 1rem;
  border: 1px solid #07A299;
  border-radius: 4px;
  transition: all 0.2s ease;
  margin-top: 0.5rem;
}

.back-to-recommendations:hover {
  background-color: #07A299;
  color: white;
  text-decoration: none;
}

/* Dataset Controls */
.dataset-controls {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 15px;
  background-color: #f8f9fa;
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid #e9ecef;
}

.search-section {
  flex: 1;
  max-width: 500px;
}

.search-label {
  display: block;
  font-weight: 500;
  color: #333;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.dataset-search {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 16px;
  background-color: white;
  transition: border-color 0.3s ease;
}

.dataset-search:focus {
  outline: none;
  border-color: #07A299;
  box-shadow: 0 0 0 3px rgba(7, 162, 153, 0.1);
}

.dataset-search::placeholder {
  color: #999;
}

/* Controls Right Side */
.controls-right {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
}

/* Sort Controls */
.sort-controls {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sort-label {
  font-weight: 500;
  color: #333;
  font-size: 0.95rem;
}

/* View Toggle */
.view-toggle {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.view-toggle-label {
  font-weight: 500;
  color: #333;
  font-size: 0.95rem;
  white-space: nowrap;
}

.sort-select {
  padding: 8px 12px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-size: 14px;
  background-color: white;
  cursor: pointer;
  transition: border-color 0.3s ease;
}

.sort-select:focus {
  outline: none;
  border-color: #07A299;
}

/* Sort Button Controls */
.sort-controls span {
  font-weight: 500;
  color: var(--syntax-highlight-fg);
}

.sort-option {
  padding: 0.5rem 1rem;
  border: 1px solid var(--syntax-highlight-comment);
  background: var(--syntax-highlight-bg);
  color: var(--syntax-highlight-fg);
  text-decoration: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.sort-option:hover {
  background: var(--syntax-highlight-comment);
  border-color: var(--syntax-highlight-fg);
}

.sort-option.active {
  background: var(--syntax-highlight-fg);
  color: var(--syntax-highlight-bg);
  border-color: var(--syntax-highlight-fg);
}

/* View Toggle */
.view-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
}

.view-toggle-label {
  font-weight: 500;
  color: #666;
}

.view-toggle-container {
  display: flex;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  overflow: hidden;
  background: white;
}

.view-btn {
  background: white;
  border: none;
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
  font-size: 14px;
}

.view-btn:hover {
  background: #f5f5f5;
}

.view-btn.active {
  background: #07A299;
  color: white;
}

.view-btn.active:hover {
  background: #066f6a;
}

/* Results Info */
.results-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 1.5rem 0;
  padding: 1rem;
  background-color: #f8f9fa;
  border-radius: 6px;
  font-size: 0.95rem;
  border: 1px solid #e9ecef;
}

#results-count {
  font-weight: 500;
  color: #333;
}

.filter-status {
  color: #666;
  font-size: 0.9rem;
}

/* Kategorien-Filter */
.category-filter-container {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 12px;
  border: 1px solid #e9ecef;
}

.category-filter-container h4 {
  margin: 0 0 8px 0;
  font-size: 1em;
  color: #333;
}

.category-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1rem;
  margin: 0.25rem;
  border-radius: 25px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  border: none;
  font-weight: 500;
  background: #f8f9fa;
  color: #333;
}

.category-badge .category-icon {
  display: none; /* Hide icons for cleaner look */
}

.category-badge:hover {
  background: #e9ecef;
  color: #000;
}

.category-badge.active {
  background: #089289;
  color: #ffffff;
  font-weight: 600;
}

/* Filter-Container */
.tag-filter-container,
.format-filter-container {
  margin-bottom: 20px;
  width: 100%;
}

.filter-heading {
  margin-bottom: 10px;
  font-weight: bold;
  color: #555;
}

.format-badge {
  background: transparent;
  color: #666;
  border: 1px solid #ddd;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.format-badge:hover {
  border-color: #07A299;
  color: #07A299;
}

.format-badge.active {
  background-color: #07A299;
  color: white;
  border-color: #07A299;
}

.format-list,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 15px;
}

.tag-badge {
  display: inline-block;
  padding: 4px 10px;
  background: #f1f1f1;
  border-radius: 16px;
  font-size: 0.9em;
  cursor: pointer;
  transition: background-color 0.2s;
}

.tag-badge.active {
  background: #07A299;
  color: white;
}

.tag-badge:hover {
  background: #e8e8e8;
}

.tag-badge.active:hover {
  background: #06928a;
}

/* Datasets Table */
.table-wrapper {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  background: white;
}

.datasets-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.datasets-table th {
  text-align: left;
  padding: 12px 16px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-bottom: 2px solid #dee2e6;
  font-weight: 600;
  color: #495057;
  position: relative;
  white-space: nowrap;
}

.datasets-table th.sortable {
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s ease;
}

.datasets-table th.sortable:hover {
  background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
}

.sort-icon {
  opacity: 0.5;
  margin-left: 0.5rem;
  font-size: 0.8rem;
}

.datasets-table th.sortable:hover .sort-icon {
  opacity: 1;
}

.datasets-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #f1f3f4;
  vertical-align: top;
  line-height: 1.5;
}

.datasets-table tr:hover {
  background: #f8f9fa;
}

.datasets-table tr:last-child td {
  border-bottom: none;
}

.dataset-link {
  color: #07A299;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.dataset-link:hover {
  color: #066f6a;
  text-decoration: underline;
}

.dataset-description {
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  color: #666;
  font-size: 0.9rem;
}

.dataset-formats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.format-badge {
  background-color: #e9ecef;
  color: #495057;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
}

.dataset-actions {
  display: flex;
  gap: 0.5rem;
}

.action-btn {
  padding: 0.25rem 0.5rem;
  background: #07A299;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.8rem;
  transition: background-color 0.2s ease;
}

.action-btn:hover {
  background: #066f6a;
  text-decoration: none;
  color: white;
}

/* Tile View - Using Unified Cards */
.datasets-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

/* All tile-specific classes are now handled by the unified .dataset-card styles in style.css */

/* All tile-specific classes are now handled by the unified .dataset-card styles in style.css */

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

.dataset-tile:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.dataset-tile-header {
  padding: 15px;
  background: #f9f9f9;
  border-bottom: 1px solid #eee;
}

.dataset-tile-image {
  background: #ccf0eb;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 180px; /* Feste Höhe für alle Bilder */
  overflow: hidden;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  position: relative; /* Für absolute positioning der Kategorie-Icons */
}

.dataset-tile-image img {
  object-fit: cover; /* Ändere von contain zu cover für vollständige Abdeckung */
  width: 100%;
  height: 100%;
  padding: 0; /* Entferne Padding für vollständige Abdeckung */
}

.dataset-tile-title {
  margin: 0;
  font-size: 1.1em;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  height: 1.5em; /* Feste Höhe für den Titel */
}

.dataset-tile-title a {
  color: #07A299;
  text-decoration: none;
}

.dataset-tile-title a:hover {
  text-decoration: underline;
}

.dataset-tile-body {
  padding: 15px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.dataset-tile-org {
  color: #666;
  font-size: 0.9em;
  margin-bottom: 10px;
}

.dataset-tile-desc {
  font-size: 0.9em;
  color: #333;
  margin-bottom: 10px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  flex-grow: 1; /* Beschreibung nimmt verfügbaren Platz ein */
}

.dataset-tile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
  max-height: 4.5em; /* Begrenzte Höhe für Tag-Bereich */
  overflow: hidden;
}

.dataset-tile-tag {
  font-size: 0.8em;
  background: #f1f1f1;
  padding: 2px 8px;
  border-radius: 12px;
}

.dataset-tile-category-tag {
  font-size: 0.8em;
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid;
  background: transparent !important;
  font-weight: 500;
  margin-right: 2px;
}

.dataset-tile-tracking {
  margin-top: 8px;
  padding: 6px 0;
  border-top: 1px solid #eee;
  font-size: 0.8em;
  color: #666;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.tracking-total {
  font-weight: 500;
  color: #333;
}

.tracking-recent {
  font-size: 0.9em;
  color: #888;
}

.dataset-tile-format {
  display: inline-block;
  background: transparent;
  color: black;
  border: 1px solid black;
  padding: 2px 6px;
  border-radius: 8px;
  font-size: 0.75em;
  font-weight: 500;
  margin-right: 4px;
  margin-bottom: 2px;
}

.dataset-tile-footer {
  background: #f9f9f9;
  padding: 12px;
  border-top: 1px solid #eee;
  text-align: left;
  margin-top: auto;
  min-height: 20px;
}

/* Highlight für Suchtreffer */
.highlight {
  background-color: #ffff00;
  font-weight: bold;
}
