.search-text {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.25rem;
    position: relative;
  }

  @media (min-width: 768px) {
    .search-text {
      flex-direction: row;
      align-items: flex-start;
    }
  }

  .search-input-wrapper {
    display: flex;
    width: 100%;
  }

  .full-width {
    align-items: center;
    background: #F8F8F8;
    border: 1px solid #8B8B8B;
    border-collapse: collapse;
    border-radius: 10px 0 0 10px;
    border-right: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    display: flex;
    font-size: 1rem;
    font-weight: 500;
    padding: .75rem 1rem;
    transition: all 0.25s ease-in-out;
    width: 100%;
  }

  .full-width:focus {
    border-color: #4E6ACA;
    box-shadow: 0 2px 8px rgba(78, 106, 202, 0.25);
    outline: none;
  }

  .full-width:hover {
    border-color: #4E6ACA;
    box-shadow: 0 2px 5px rgba(78, 106, 202, 0.15);
  }

  #text-submit {
    padding: .75rem 1rem;
  }

  #clear-search {
    align-items: center;
    background: #fff;
    border: 1px solid #ccc;
    border-collapse: collapse;
    border-radius: 0 10px 10px 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    display: flex;
    font-size: 1rem;
    padding: .75rem 1rem;
    transition: all 0.25s ease-in-out;
    justify-content: center;
  }

  #clear-search:hover {
    border-color: #4E6ACA;
    box-shadow: 0 2px 5px rgba(78, 106, 202, 0.15);
    color: #4E6ACA;
  }

  .search-tax {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1.25rem;
    position: relative;
  }

  @media (min-width: 640px) {
    .search-tax {
      grid-template-columns: repeat(1, 1fr);
    }
  }

  @media (min-width: 1024px) {
    .search-tax {
      grid-template-columns: repeat(3, 1fr);
    }
  }

  .filter-options {
    padding-top: .5rem;
  }

  .filter-options label {
    display: block;
    margin-bottom: 5px;
  }

  /* Dropdown Container */
  .custom-dropdown {
    position: relative;
    width: 100%;
    margin-bottom: 1rem;
  }

  .dropdown-toggle {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 10px;
    cursor: pointer;
    padding: 12px 15px;
    width: 100%;
    max-width: 100%;
    transition: all 0.25s ease-in-out;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    font-weight: 500;
  }

  .dropdown-toggle:hover {
    border-color: #4E6ACA;
    box-shadow: 0 2px 5px rgba(78, 106, 202, 0.15);
  }

  .dropdown-toggle::after {
    content: '\e804';
    font-family: "fontello", sans-serif;
    margin-left: 0.5rem;
    transition: transform 0.3s ease, color 0.2s ease;
    font-size: 0.8rem;
    color: #666;
  }

  .custom-dropdown.open .dropdown-toggle {
    border-color: #4E6ACA;
    box-shadow: 0 2px 8px rgba(78, 106, 202, 0.25);
  }

  .custom-dropdown.open .dropdown-toggle::after {
    content: '\e805';
    transform: rotate(180deg);
    color: #4E6ACA;
  }

    /* Dropdown Menu (Hidden by Default) */
  .dropdown-menu {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    display: none;
    left: 0;
    max-height: 350px;
    overflow-y: auto;
    padding: 15px;
    position: absolute;
    top: calc(100% + 5px);
    width: 100%;
    z-index: 50 !important;
    animation: fadeIn 0.25s ease;
  }

  /* Improved responsive widths */
  @media (min-width: 640px) {
    .dropdown-menu {
      width: 200%;
      max-width: 750px;
    }
  }

  @media (min-width: 1280px) {
    .dropdown-menu {
      width: 250%;
      max-width: 800px;
    }
  }

  .dropdown-menu::-webkit-scrollbar {
    width: 8px;
  }

  .dropdown-menu::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
  }

  .dropdown-menu::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
  }

  .dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: #aaa;
  }

  /* Checkbox Labels - Improved touch target sizes */
  .dropdown-menu label {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 10px;
    border-radius: 6px;
    transition: all 0.2s ease;
    margin-bottom: 4px;
  }

  .dropdown-menu label:hover {
    background: #f5f7ff;
  }

  .dropdown-menu input[type="checkbox"] {
    margin-right: 0.75rem;
    accent-color: #4E6ACA;
    cursor: pointer;
    transform: scale(1.2);
    min-width: 16px;
  }

  .custom-dropdown.open .dropdown-menu {
    display: grid;
    gap: 0.5rem;
    grid-template-columns: 1fr;
  }

  @media (min-width: 768px) {
    .custom-dropdown.open .dropdown-menu {
      grid-template-columns: repeat(2, 1fr);
    }
  }

  @media (min-width: 1024px) {
    .custom-dropdown.open .dropdown-menu {
      grid-template-columns: repeat(2, minmax(150px, 1fr));
    }
  }

  @media (min-width: 1280px) {
    .custom-dropdown.open .dropdown-menu {
      grid-template-columns: repeat(4, minmax(150px, 1fr));
    }
  }
  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .dropdown-text {
    width: 100%;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #sort-container {
    width: 100%;
  }

  #sortOrder {
    flex: 1;
    padding: 10px;
  }

#resource-filter-summary {
  display: flex;
  gap: .5rem;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  width: 100%;

  p {
    margin: 0;
    padding: 0;

    @apply leading-5;

    &:first-child {
      @apply leading-none;
    }
  }

  #applied-filters {
    @apply italic;

    margin-top: 0;
    font-size: 14px;

    .filter-item {
      background: #f0f0f0;
      border: 1px solid #ccc;
      border-radius: 20px;
      display: inline-block;
      margin: 0 5px;
      padding: 5px 10px;

      button.remove-filter {
        background: none;
        border: none;
        color: #0073aa;
        cursor: pointer;
        font-size: 16px;
        margin-left: 5px;

        &:hover { color: #d63638; }
      }
    }
  }

  #sort-container {
    @apply p-0 m-0 leading-5;

    label {
      @apply font-bold;
    }

    select {
      @apply mt-1;
    }
  }
}

#resource-results {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.pagination {
  display: flex;
  justify-content: center;
  margin-top: 20px;

  ul {
    display: flex;
    list-style: none;
    gap: 8px;
    padding: 0;
  }

  a, span {
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #4E6ACA;
    margin: 0 5px;
    padding: 8px 12px;
    text-decoration: none;
  }

  a:hover {
    background: #4E6ACA;
    color: #fff;
  }

  .current {
    background: #4E6ACA;
    border-color: #4E6ACA;
    color: #fff;
    padding: 8px 12px;
  }
}

@media (min-width: 768px) { /* Tailwind 'md' breakpoint */
  #resource-results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) { /* Tailwind 'lg' breakpoint */
  #resource-results {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
