/* ========================================
   GRID LAYOUT
   ======================================== */

.datasets-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  margin-bottom:80px;
}

/* ========================================
   SIDEBAR
   ======================================== */

.datasets-sidebar {
  width: 280px;
  padding-right: 24px;
  display: flex;
  flex-direction: column;
}

/* ========================================
   SIDE SEARCH
   ======================================== */

.datasets-side-search {
  width: 100%;
  display: flex;
  align-items: center;
  font-family: var(--font-roboto);
  gap: 12px;
  padding: 14px 18px;
  border-radius: 10px;
  background: var(--cf-white);
  box-shadow: 1.5px 1px 4px 0 rgba(22, 35, 152, 0.25);
  margin-bottom: 24px;
  height: 50px;
}

.datasets-side-search .search-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.side-search-box {
  display: flex;
  align-items: center;
  border: 1px solid var(--cf-border-grey);
  border-radius: 8px;
  height: 44px;
  padding: 0 12px;
  background: var(--cf-white);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.side-search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 15px;
}

.side-search-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 17px;
  color: var(--cf-primary-main);
}

.datasets-side-search input[type="text"] {
  flex: 1;
  border: none;
  outline: none;
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 28px;
  letter-spacing: 0.444px;
  color: var(--cf-primary-main);
  background: transparent;
  font-family: var(--font-roboto);
}

#dataset-search-form input[type="text"]::placeholder {
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 28px;
  letter-spacing: 0.444px;
  color: var(--cf-primary-main);
}

/* ========================================
   FILTERS SIDEBAR
   ======================================== */

.filters-sidebar {
  width: 263px;
  min-height: auto;
  border-radius: 4px;
  background: var(--cf-bg-blue);
  display: flex;
  flex-direction: column;
  gap: 0;
  box-sizing: border-box;
  padding: 0;
}

.filters-advanced {
  width: 263px;
  min-height: auto;
  border-radius: 4px;
  background: var(--cf-bg-blue);
  display: flex;
  flex-direction: column;
  gap: 0;
  box-sizing: border-box;
}

.filters-advanced-header {
  padding: 8px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.filters-advanced-title {
  font-size: 16px;
  font-style: italic;
  font-weight: 400;
  line-height: 20px;
  letter-spacing: 0;
  color: var(--cf-grey-500);
  margin: 0;
}

.advanced-search-label {
  font-size: 16px;
  font-style: italic;
  font-weight: 400;
  line-height: 20px; 
  letter-spacing: 0;
  color: var(--cf-grey-500);
  margin: 0;
  padding: 8px 15px;
  display: flex;
  align-items: center;
}

.filters-sidebar .module {
  padding: 0;
  background-color: transparent;
  border-radius: 0;
  box-shadow: none;
}

/* ========================================
   FACET ACCORDION
   ======================================== */

.facet-container { 
  margin-top: 10px; 
}

.facet-accordion {
  width: 100%;
  border-radius: 4px;
  background: var(--cf-bg-blue);
  box-sizing: border-box;
  overflow: hidden;
  margin: 0 0 10px 0;
  display: block;
}

.facets-list {
  display: block;
  font-size: 0; 
}

.facets-list .facet-accordion {
  font-size: 16px; 
}

.facets-list > *:last-child {
  margin-bottom: 0;
}


.facets-ver-mais-btn {
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: none;
  border: none;
  padding: 0;
  color: #000F9F;
  font-size: 13px;
  font-weight: 500;
  margin-top: 4px;
  margin-bottom: 0;
  width: 263px;
  transition: color 0.2s ease;
}

.facets-ver-mais-btn:hover {
  color: #000060;
}

.facets-ver-mais-btn svg {
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.facets-ver-mais-btn.open svg {
  transform: rotate(180deg);
}

.facets-extra-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
  font-size: 0; /* match parent whitespace fix */
}

.facets-extra-panel.open {
  max-height: 2000px;
}

.facets-extra-panel .facet-accordion {
  font-size: 16px;
}

.accordion-btn {
  display: block;
  position: relative;
  padding: 12px 48px 12px 20px;
  cursor: pointer;
  background: var(--cf-bg-blue);
  border: 0;
  box-sizing: border-box;
  text-align: left;
  width: 100%;
  font-size: 16px;
  font-weight: 700;
  line-height: 120%;
  letter-spacing: 0;
  color: var(--cf-black);
}

.accordion-btn .filters-dropdown__icon {
  position: absolute;
  right: 16px;
  top: 50%;
  margin-top: -12px;
  width: 24px;
  height: 24px;
  transition: transform 0.2s;
}

.accordion-btn .filters-dropdown__icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.accordion-btn.open .filters-dropdown__icon {
  transform: rotate(0deg);
}

.accordion-btn:not(.open) .filters-dropdown__icon {
  transform: rotate(180deg);
}

.accordion-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.accordion-panel.show {
  max-height: none;
  overflow: visible;
}

.accordion-panel .module-content.empty {
  padding: 12px 20px;
  font-size: 14px;
  color: var(--cf-grey-500);
  font-style: italic;
  margin: 0;
}

/* ========================================
   FACET ITEMS
   ======================================== */

.facet-values {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  width: 100%;
  padding: 0 20px 12px 20px;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  box-sizing: border-box;
}

.facet-values li {
  margin-bottom: 0;
  width: 100%;
}

.facet-item {
  display: flex;
  width: 100%;
  height: 41px;
  padding: 0 16px;
  align-items: center;
  gap: 16px;
  border-radius: 2px;
  background: var(--cf-white);
  box-shadow: 2px 4px 4px 0 rgba(22, 35, 152, 0.25);
  cursor: pointer;
  border: 1px solid transparent;
  box-sizing: border-box;
  transition: box-shadow 0.2s, background 0.2s, border-color 0.2s;
  text-decoration: none;
}

.facet-item:hover {
  box-shadow: 2px 4px 8px 0 rgba(22, 35, 152, 0.35);
  text-decoration: none;
}

.facet-item.active {
  border-radius: 2px;
  border: 1px solid var(--cf-blue-border-alt);
  background: var(--cf-primary-main);
  box-shadow: 2px 4px 4px 0 rgba(22, 35, 152, 0.25);
}

.facet-item.active .facet-name {
  color: var(--cf-white);
}

.facet-item.active .facet-count {
  color: var(--cf-blue-light);
}

.facet-name {
  flex: 1;
  font-size: 16px;
  font-weight: 300;
  line-height: 120%;
  letter-spacing: 0;
  color: var(--cf-black);
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.facet-accordion[data-facet="res_type"] .facet-name {
  text-transform: capitalize;
}

.facet-count {
  font-size: 16px;
  font-weight: 400;
  line-height: 120%;
  letter-spacing: 0;
  color: var(--cf-blue-light);
  flex-shrink: 0;
}

/* ========================================
   DATASETS RESULTS
   ======================================== */

.datasets-header { 
  display: flex; 
  width: 829px; 
  max-width: 100%; 
  height: auto; 
  min-height: 32px; 
  justify-content: space-between; 
  align-items: center; 
  box-sizing: border-box; 
  margin-bottom: 40px; 
}

.datasets-header__title { 
  width: auto; 
  height: 32px; 
  font-size: 24px; 
  font-weight: 700; 
  line-height: 32px; 
  letter-spacing: 0; 
  color: var(--cf-text-primary); 
  margin: 0; 
  border-bottom: none !important; 
  font-family: var(--font-roboto); 
}

.datasets-header__sort { 
  position: relative; 
  display: flex; 
  flex-direction: row; 
  width: auto; 
  height: auto; 
  padding: 8px 12px; 
  justify-content: center; 
  align-items: center; 
  gap: 10px; 
  border-radius: 4px; 
  border: 2px solid var(--cf-primary-main); 
  box-sizing: border-box; 
  cursor: pointer; 
}

.datasets-header__sort-text { 
  width: auto; 
  height: auto; 
  font-size: 12px; 
  font-weight: 500; 
  line-height: 120%; 
  letter-spacing: 0; 
  color: var(--cf-primary-main); 
  display: flex; 
  align-items: center; 
}

.datasets-header__sort-icon { 
  width: 8px; 
  height: 5px; 
  transform: rotate(0deg); 
  flex-shrink: 0; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
}

.datasets-header__sort-icon svg { 
  width: 8px; 
  height: 5px; 
  display: block; 
}

.datasets-header__sort.is-open .datasets-header__sort-icon { 
  transform: rotate(180deg); 
}

.datasets-header__sort-dropdown { 
  position: absolute; 
  top: 100%; 
  right: 0; 
  margin-top: 4px; 
  background: var(--cf-white); 
  border: 2px solid var(--cf-primary-main); 
  border-radius: 4px; 
  min-width: 150px; 
  display: none; 
  z-index: 10; 
}

.datasets-header__sort.is-open .datasets-header__sort-dropdown { 
  display: block; 
}

.datasets-header__sort-option { 
  padding: 8px 12px; 
  font-size: 12px; 
  font-weight: 500; 
  line-height: 120%; 
  letter-spacing: 0; 
  color: var(--cf-primary-main); 
  cursor: pointer; 
  border: 0; 
  background: transparent; 
  width: 100%; 
  text-align: left; 
  box-sizing: border-box; 
}

.datasets-header__sort-option:hover { 
  background: var(--cf-bg-blue); 
}

/* ========================================
   DATASET CARDS
   ======================================== */

.dataset-card {
  display: flex;
  justify-content: flex-start;
  gap: 24px;
  padding-bottom: 34px;
  margin-bottom: 34px;
  border-bottom: 1px solid var(--cf-primary-main);
  box-sizing: border-box;
  position: relative;
}

/* ========================================
   DATASET ITEMS
   ======================================== */

.package-list {
  display: flex;
  flex-direction: column;
}

.package-list .dataset-item {
  display: flex;
  flex-direction: row;
  width: 100%;
  min-height: 216px;   
  justify-content: space-between; 
  padding-bottom: 34px;
  box-sizing: border-box; 
  margin-bottom: 34px; 
  position: relative; 
  overflow: visible; 
  border-bottom: 1px solid var(--cf-primary-main); 
}

.dataset-item__bg { 
  position: absolute; 
  bottom: 34px; 
  right: 0; 
  width: 426.667px; 
  height: 120px; 
  flex-shrink: 0; 
  opacity: 0.9; 
  background-image: url('/cmporto_index/images/Malha_white.png'); 
  background-size: cover; 
  background-repeat: no-repeat; 
  background-position: center; 
  pointer-events: none; 
  z-index: 0; 
}

.dataset-item__content { 
  display: flex; 
  flex-direction: column; 
  flex: 1;
  justify-content: space-between; 
  position: relative; 
  z-index: 1; 
}

.dataset-item__header { 
  display: flex; 
  flex-direction: column; 
  width: 100%; 
  height: auto; 
  gap: 4px; 
  min-width: 0;
}

.dataset-item__category { 
  width: auto; 
  height: auto; 
  font-size: 16px; 
  font-weight: 400; 
  line-height: 20px; 
  letter-spacing: 0; 
  color: var(--cf-primary-main); 
}

.dataset-item__title-row { 
  display: flex; 
  align-items: flex-start; 
  gap: 8px; 
  width: 100%;
  min-width: 0;
}

.dataset-item__title-row > a {
  flex: 1;
  min-width: 0;
  text-decoration: none;
  overflow: hidden;
}

.dataset-item__title { 
  font-size: 22px; 
  font-weight: 700; 
  line-height: 1.3; 
  letter-spacing: 0; 
  color: var(--cf-black); 
  margin: 0; 
  cursor: pointer; 
  white-space: normal;
  overflow: visible;
  word-break: break-word;
  width: 100%;
}

.dataset-item__title:hover { 
  text-decoration: underline; 
}


.sidebar-dataset-title .dataset-icon,
.dataset-item__title-row .dataset-icon,
.dataset-item__title .dataset-icon {
  margin-left: 20px !important;
  vertical-align: middle;
  display: inline-block;
}

.dataset-item__badge { 
  width: auto; 
  height: 24px; 
  font-size: 24px; 
  font-weight: 700; 
  line-height: 100%; 
  letter-spacing: 0; 
  text-align: center; 
  color: var(--cf-primary-main); 
}

.dataset-item__description {
  width: 100%;
  margin-bottom: 10px;
  font-size: 16px; 
  font-weight: 400; 
  line-height: 20px; 
  letter-spacing: 0; 
  color: var(--cf-black);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dataset-item__meta { 
  display: flex; 
  flex-direction: column; 
  width: 100%; 
  height: auto; 
  margin-top: 10px;
  gap: 4px; 
}

.dataset-item__meta-row { 
  display: flex; 
  align-items: center; 
  gap: 4px; 
}

.dataset-item__meta-label { 
  width: auto; 
  height: 20px; 
  font-size: 16px; 
  font-weight: 500; 
  line-height: 20px; 
  letter-spacing: 0; 
  color: var(--cf-black); 
}

.dataset-item__meta-value {
  width: auto;
  height: 20px;
  font-size: 16px;
  font-weight: 400;
  line-height: 20px;
  letter-spacing: 0;
  color: var(--cf-primary-main);
}

.dataset-item__author { 
  display: inline-block;
  width: 100%;
  height: 20px; 
  font-size: 16px; 
  gap: 10px; 
  color: var(--cf-primary-main); 
  text-decoration: none;
  white-space: nowrap; 
  overflow: hidden; 
  text-overflow: ellipsis;
}

.dataset-item__formats { 
  display: flex; 
  flex-direction: row; 
  width: auto; 
  height: 20px; 
  gap: 52px; 
  margin-top: 15px; 
}

.dataset-item__format { 
  height: 20px; 
  font-size: 16px; 
  font-weight: 400; 
  line-height: 20px; 
  letter-spacing: 0; 
  color: var(--cf-black); 
}

.dataset-item__stats { 
  display: flex; 
  flex-direction: row; 
  width: 68px; 
  height: 68px; 
  gap: 4px; 
  align-items: flex-start; 
}

.dataset-item__stats-icons { 
  display: flex; 
  flex-direction: column; 
  width: 16px; 
  height: 68px; 
  gap: 10px; 
}

.dataset-item__stats-icon { 
  width: 16px; 
  height: 16px; 
  flex-shrink: 0; 
}

.dataset-item__stats-icon.icon-refresh { 
  width: 12px; 
  height: 16px; 
}

.dataset-item__stats-values { 
  display: flex; 
  flex-direction: column; 
  width: 47px; 
  height: 68px; 
  gap: 4px; 
}

.dataset-item__stats-value { 
  height: 20px; 
  font-size: 14px; 
  font-weight: 400; 
  line-height: 20px; 
  letter-spacing: 0; 
  text-align: right; 
  color: var(--cf-primary-dark); 
}

/* ========================================
   DATASET DIVIDER
   ======================================== */

.dataset-divider {
  border: none;
  border-bottom: 2px solid var(--cf-primary-main);
  margin: 0;
}

/* ========================================
   LOAD MORE BUTTON
   ======================================== */

.datasets-load-more button,
.datasets-load-more a {
  background: var(--cf-primary-main);
  color: var(--cf-white) !important;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 26px;
  border-radius: 4px;
  border: none;
}

/* ========================================
   USER HISTORY / ACTIVITY LIST
   ======================================== */

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.activity-item {
  display: flex;
  height: 86px;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid #000F9F;
  border-radius: 0;
  padding-left: 10px;
  padding-right: 10px;
}

.activity-list .activity-item:first-child {
  border-top: 1px solid #000F9F;
}

.activity-avatar {
  display: none;
}

.activity-content {
  flex: 1;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 4px;
  font-size: 14px;
  line-height: 20px;
}

.activity-user {
  font-weight: 400;
  font-style: normal;
  font-size: 16px;
  line-height: 20px;
  letter-spacing: 0;
  color: var(--cf-black);
  text-decoration: underline;
 
}

.activity-action {
  font-weight: 400;
  font-style: normal;
  font-size: 16px;
  line-height: 20px;
  letter-spacing: 0;
  color: var(--cf-black);
  margin: 0 5px 0;
}

.activity-dataset {
  font-weight: 400;
  font-style: normal;
  font-size: 16px;
  line-height: 20px;
  letter-spacing: 0;
  color: var(--cf-black);
  text-decoration: underline;
}

.activity-dataset:hover {
  text-decoration: none;
}

.activity-time {
  color: var(--cf-grey-500);
  font-size: 12px;
  flex-basis: 100%;
  margin-top: 8px;
  margin-right: 10px;
   font-weight: 400;
  font-style: normal;
  font-size: 12px;
  line-height: 20px;
  letter-spacing: 0;
}

.activity-version-btn {
  font-size: 12px;
  color: var(--cf-primary-main);
  text-decoration: underline;
  margin-left: 0;
   margin: 0 5px 0;
    font-weight: 400;
  font-style: normal;
  font-size: 12px;
  line-height: 20px;
  letter-spacing: 0;
}

.activity-version-btn:hover {
  text-decoration: none;
}

.activity-metadata-btn {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  
  width: 190px;
  min-width: 0;
  height: 24px;
  padding: 0 12px;
  background: #000F9F;
  border: none;
  border-radius: 4px;
  color: #FFF;
  font-family: var(--font-roboto);
  font-size: 12px;
  font-weight: 500;
  font-style: normal;
  line-height: 120%;
  letter-spacing: 0;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}

 .activity-metadata-btn:hover {
  background: #001080;
}

.activity-metadata-btn svg {
  width: 14.667px;
  height: 10.667px;
  stroke-width: 1.5px;
  stroke: #FFF;
  flex-shrink: 0;
  margin-left: 10px;
}


.clear-history-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--cf-white);
  border: 2px solid #dc3545;
  border-radius: 4px;
  color: #dc3545;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.clear-history-btn:hover {
  background: #dc3545;
  color: var(--cf-white);
}

.load-more-btn {
  display: block;
  margin: 24px auto 0;
  padding: 8px 26px;
  background: var(--cf-primary-main);
  color: var(--cf-white);
  font-size: 13px;
  font-weight: 600;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.load-more-btn:hover {
  opacity: 0.9;
}


.resource-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  align-items: start;
  padding: 16px 0;
  border-bottom: 1px solid #e0e0e0;
}


.res-col {
  align-self: center;
}


.resource-details {
  grid-column: 1 / -1;
  display: none;
  background: #f9f9f9;
  border-left: 2px solid #000F9F;
  padding: 16px 0;
  margin-top: 12px;
}

.resource-details.open {
  display: block;
}

.resource-details-content {
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.resource-detail-item {
  display: flex;
  gap: 8px;
  font-size: 14px;
  line-height: 1.5;
}

.resource-detail-item strong {
  color: #000F9F;
  min-width: 100px;
  flex-shrink: 0;
}

.resource-detail-item span {
  color: #333;
}

.res-more {
  cursor: pointer;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s ease;
  margin-top: 8px;
  font-size: 13px;
  color: #666;
}

.res-more:hover {
  color: #000F9F;
}

.res-more svg {
  transition: transform 0.3s ease;
}

.res-more.open svg {
  transform: rotate(180deg);
}

/* ========================================
   FACET EXT FILTERS (tutor / dates)
   ======================================== */

.facet-ext-filter {
  padding: 8px 20px 14px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.facet-ext-input-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.facet-ext-input {
  flex: 1;
  border: 1px solid #CCCCCC;
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 14px;
  font-family: var(--font-roboto);
  outline: none;
  background: #FFFFFF;
  color: var(--cf-black);
  min-width: 0;
}

.facet-ext-input:focus {
  border-color: #000F9F;
}

.facet-year-input {
  -moz-appearance: textfield;
}

.facet-year-input::-webkit-inner-spin-button,
.facet-year-input::-webkit-outer-spin-button {
  opacity: 1;
}

.facet-ext-go-btn {
  background: #000F9F;
  color: #FFFFFF;
  border: none;
  border-radius: 6px;
  padding: 7px 11px;
  font-size: 15px;
  cursor: pointer;
  flex-shrink: 0;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.facet-ext-go-btn:hover {
  background: #1a2fd4;
}

.filters-clear-all-btn {
  display: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--cf-grey-500);
  font-size: 12px;
  font-family: var(--font-roboto);
  font-style: italic;
  white-space: nowrap;
  flex-shrink: 0;
}

.filters-clear-all-btn:hover {
  color: #000F9F;
}

.facet-ext-clear-btn {
  background: none;
  border: 1px solid #CCCCCC;
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 12px;
  cursor: pointer;
  color: #666666;
  text-align: left;
  font-family: var(--font-roboto);
}

.facet-ext-clear-btn:hover {
  border-color: #FF4444;
  color: #FF4444;
}

/* ========================================
   FACET TAG SEARCH
   ======================================== */

.facet-tag-search-wrap {
  padding: 8px 20px 4px 20px;
}

.facet-tag-search-input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #CCCCCC;
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 14px;
  font-family: var(--font-roboto);
  outline: none;
  background: #FFFFFF;
}

.facet-tag-search-input:focus {
  border-color: #000F9F;
}


#datasets-results {
  position: relative;
  min-height: 200px;
}

.ajax-loading {
  position: relative;
}

.ajax-loading .package-list {
  pointer-events: none;
}

.ajax-loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.65);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 80px;
  z-index: 20;
  border-radius: 4px;
}

.ajax-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #E0E4FF;
  border-top-color: #000F9F;
  border-radius: 50%;
  animation: ajax-spin 0.6s linear infinite;
}

@keyframes ajax-spin {
  to { transform: rotate(360deg); }
}

/* ========================================
   SIDEBAR TOGGLE BUTTON (mobile only)
   ======================================== */
.sidebar-toggle {
  display: none;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 16px;
  margin-bottom: 8px;
  background: var(--cf-bg-blue);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  color: var(--cf-black);
  box-sizing: border-box;
}

.sidebar-toggle .toggle-arrow {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.sidebar-toggle[aria-expanded="true"] .toggle-arrow {
  transform: rotate(180deg);
}

/* ========================================
   DATASETS PAGE — MOBILE RESPONSIVENESS
   ======================================== */
@media (max-width: 768px) {
  .datasets-wrapper { overflow-x: hidden; max-width: 100%; }
  .datasets-grid { grid-template-columns: 1fr; gap: 0; }
  .datasets-sidebar { width: 100%; padding-right: 0; margin-bottom: 16px; box-sizing: border-box; }
  .filters-sidebar, .filters-advanced { width: 100%; max-width: 100%; box-sizing: border-box; }
  .dataset-item__bg { display: none; }
  .dataset-item__content { min-width: 0; }
  .dataset-item__author { white-space: normal; height: auto; }
  .dataset-item__formats { gap: 12px; flex-wrap: wrap; height: auto; }
  .datasets-header { width: 100%; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
  .datasets-header__title { font-size: 18px; height: auto; line-height: 1.4; }
  .sidebar-toggle { display: flex; }
  .filters-sidebar { display: none; }
  .filters-sidebar.filters-open { display: block; }
}
