/* Advanced Filter Button */
#toggleAdvancedSearch {
  border-radius: 25px;
  padding: 0.75rem 1.5rem;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 193, 7, 0.3);
}

#toggleAdvancedSearch:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

/* Animation for test offering cards */
.test-offering-card {
  transition: all 0.3s ease;
  margin-bottom: 0.85rem;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  border-left: 4px solid var(--color-teal);
}

body:has(.trainings-bg) .test-offering-card {
  border-left-color: #1f4f53;
}

body:has(.equipments-bg) .test-offering-card {
  border-left-color: #583070;
}

body:has(.tests-bg) .test-offering-card {
  border-left-color: #2160b5;
}

/* Keep results below hero filter dropdowns */
.section.min-h-hvh,
#search-results {
  position: relative;
  z-index: 1;
}

.tags .tag .icon {
  margin-right: 0.2rem;
}

.sample-type-tags,
.training-tags {
  margin-bottom: 0;
}

@media screen and (max-width: 768px) {
  .section.min-h-hvh {
    padding-top: 1rem;
    padding-bottom: 1.25rem;
  }

  #search-results > .mb-5 {
    margin-bottom: 0.85rem !important;
  }

  .test-offering-card {
    padding: 0.65rem 0.7rem !important;
    margin: 0 0 0.55rem 0;
  }

  .test-offering-card .columns {
    margin-left: -0.35rem !important;
    margin-right: -0.35rem !important;
    margin-top: -0.35rem !important;
    margin-bottom: -0.35rem !important;
  }

  .test-offering-card .column {
    padding: 0.35rem !important;
  }

  .test-info {
    padding-right: 0;
  }

  .test-offering-card .title.is-4,
  .test-offering-card .title.is-5 {
    font-size: 0.95rem !important;
    margin-bottom: 0.15rem !important;
    line-height: 1.25;
  }

  .test-offering-card .title.is-6 {
    font-size: 0.75rem !important;
    margin-bottom: 0.25rem !important;
  }

  .test-offering-card .subtitle.is-6,
  .test-offering-card .is-6.mb-3,
  .test-offering-card p.is-6 {
    font-size: 0.72rem !important;
    margin-bottom: 0.35rem !important;
    line-height: 1.3;
  }

  /* Drop bulky secondary blocks on mobile; details page has full info */
  .test-offering-card .sample-requirements,
  .test-offering-card .training-description,
  .test-offering-card .focal-person-info {
    display: none !important;
  }

  .test-offering-card .sample-type-tags,
  .test-offering-card .training-tags {
    margin-top: 0.4rem;
  }

  .test-offering-card .tags {
    gap: 0.25rem;
  }

  .test-offering-card .tags .tag {
    font-size: 0.65rem !important;
    padding: 0.18rem 0.4rem !important;
    height: auto;
    line-height: 1.2;
  }

  .lab-mobile-contact-section {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0;
    padding: 0.45rem 0.55rem !important;
    border-radius: 6px;
    border-bottom: none !important;
    background-color: rgba(248, 250, 252, 0.95) !important;
    box-shadow: none;
  }

  .lab-mobile-contact-section div {
    min-width: 0;
  }

  .lab-mobile-logo {
    width: 32px !important;
    height: 32px !important;
    margin-right: 0 !important;
    flex-shrink: 0;
  }

  .lab-mobile-contact-section h4 {
    font-size: 0.78rem !important;
    line-height: 1.25 !important;
    margin-bottom: 0 !important;
  }

  .lab-mobile-contact-section p {
    font-size: 0.68rem !important;
    line-height: 1.2;
    margin: 0 !important;
  }

  .equipment-list-row {
    gap: 0.55rem;
  }

  .equipment-list-thumb {
    flex-basis: 52px !important;
    width: 52px !important;
    height: 52px !important;
    border-radius: 6px;
  }

  .equipment-list-thumb--placeholder {
    font-size: 1.1rem !important;
  }

  #toggleAdvancedSearch {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }

  .header-icon .icon {
    font-size: 2rem !important;
  }

  .pagination {
    flex-wrap: wrap;
  }

  .pagination-list {
    margin-top: 0.5rem;
    justify-content: center;
  }

  .pagination-link {
    height: 2.25rem;
    width: 2.25rem;
    margin: 0.15rem;
  }

  .pagination-previous,
  .pagination-next {
    flex: 0 0 100%;
    margin-bottom: 0.5rem;
  }

  .pagination-results-info {
    text-align: center;
  }
}

@media screen and (max-width: 480px) {
  .test-offering-card {
    padding: 0.55rem 0.6rem !important;
    margin-bottom: 0.45rem;
  }

  .test-offering-card .title.is-4,
  .test-offering-card .title.is-5 {
    font-size: 0.9rem !important;
  }
}
