  /* Base search form */
  .search-bar {
    display: flex;
    align-items: center;
    overflow: hidden;
    transition: max-width 0.4s ease, box-shadow 0.3s ease, padding 0.4s ease;
    position: absolute;
    right: 20px;
    top: 20px;
    background-color: transparent;
    max-width: 0;
    padding: 0;
    box-shadow: none;
  }

  /* When search bar is open (on mobile or desktop, controlled via JS) */
  .search-bar.open {
    max-width: 300px;
    padding: 0rem 0.2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }

  /* Search input field */
  .search-bar input[type="search"] {
    border: none;
    outline: none;
    font-size: 1rem;
    background: transparent;
    color: var(--color-blue-primary);
    width: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
    margin-left: 0.5rem;
  }

  /* Reveal input when search bar is open */
  .search-bar.open input[type="search"] {
    opacity: 1;
  }

  /* Submit button (magnifier icon) */
  .search-toggle {
    border: none;
    padding: 0.5rem;
    border-radius: 9999px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white; /* Default color for magnifier icon */
    transition: color 0.3s ease;
    background: transparent;
  }

  /* Change icon color when search bar is open */
  .search-bar.open .search-toggle {
    color: var(--color-blue-primary);
  }

  /* Default (collapsed) state for magnifier icon */
  .search-toggle svg {
    stroke: white;
    transition: stroke 0.3s ease;
  }

  /* When the search bar is open, the magnifier icon turns blue */
  .search-bar.open .search-toggle svg {
    stroke: var(--color-blue-primary);
  }

  /* Hide the "X" icon by default */
  .search-toggle .icon-close {
    display: none;
  }

  /* Show the "X" icon when the search bar is open */
  .search-bar.open .icon-search {
    display: none;
  }

  .search-bar.open .icon-close {
    display: inline;
  }
  /* Always open on desktop */
  .search-bar {
    max-width: 300px;
    padding: 0 0.2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    background-color: white;
    position: static; /* Remove absolute positioning */
  }

  .search-bar input[type="search"] {
    opacity: 1; /* Always visible */
  }

  /* On desktop, always show the magnifier icon */
  .search-toggle .icon-search {
    display: inline;
  }

  /* On desktop, hide the "X" icon */
  .search-toggle .icon-close {
    display: none !important;
  }

  /* Ensure the magnifier icon is blue on desktop */
  .search-toggle svg {
    stroke: var(--color-blue-primary);
  }

  @media (min-width: 1340px) {
    .custom-search-wrapper {
      display: flex;
      justify-content: right;
      position: absolute;
      right: 0px;
      top: 56px;
    }
  }