
/* HEADER */
header {
  border-bottom: .5px solid var(--border-color);
  width: 100%;
  display: flex;
  flex-direction: column; /* mobile stacked */
  align-items: center;
  
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 90%;
  max-width: 1200px;
  padding: 1rem 0;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  position: relative;
}

.menu-button {
  color: black;
  margin-top: -0.2rem;
  -webkit-appearance: none;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  padding: 0.25rem;
  line-height: 1;
}

.menu-dropdown {
  position: absolute;
  top: 100%;
  left: auto;
  right:0;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  display: none;
  flex-direction: column;
  min-width: 150px;
  z-index: 1000;
}

.menu-dropdown a {
  padding: 0.75rem 1rem;
  text-decoration: none;
  color: var(--text-color);
  border-bottom: 1px solid var(--border-color);
  font-size: 0.95rem;
}

.menu-dropdown a:last-child { border-bottom: none; }
.menu-dropdown a:hover { background-color: #f5f5f5; }

.title {
  display: flex;
  align-items: center;
  gap: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-color);
}

.title-icon {
  height: 1em;
  width: auto;
  transform: translateY(-0.06em);
  margin-right: .5rem;
}

.nav-buttons{
    display: flex;
  align-items: center;
  gap: 0.4rem;
  position: relative;
    left: auto;
    right: 0;
}
  
  
.search-form {
  position: relative;
  display: flex;
  align-items: center;  /* this centers icon vertically */
}

.search-form input[type="text"] {
  width: 100%;
  padding: 0.75rem 2.5rem 0.75rem 1rem; /* add room on right */
  font-size: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background-color: var(--input-bg);
  color: var(--text-color);
}



.search-form button.search-button {
  position: absolute;
  right: 0.4rem;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
}

.search-form img.search-icon {
  width: 26px;
  height: 26px;
  display: block;
  pointer-events: none; /* ensures click hits button */
}




.search-container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;   /* remove top/bottom margin */
  padding-bottom: 0;
  margin-bottom: 0;
}



.search-container input[type="text"] {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background-color: var(--input-bg);
  color: var(--text-color);
  border-radius: 6px;
}

/* Remove default form spacing */
.search-container form {
  margin: 0;
  padding: 0;
  margin-bottom: 1.2rem; /* control bottom space consistently */
  
}



/* Default (mobile first) */
.search-container-two { display: none; }   /* hide desktop search bar */
.search-container { display: block; }      /* show bottom search bar */

/* Desktop view */
@media (min-width: 768px) {
  .search-container-two { display: flex; } /* show desktop search bar */
  .search-container { display: none; }     /* hide bottom search bar */
  
    /* ADD: header-top aligned to edges like page 2 */
  .header-top {
    display: grid;
    grid-template-columns: auto 1fr auto; /* left | center | right */
    align-items: center;
    width: 100%;          /* full width for edges */
    max-width: 1200px;
    margin: 0 auto;       /* center grid horizontally */
    padding: 1rem 1.5rem; /* hamburger and login flush with edges */
  }

  /* ADD: desktop search bar show/hide */
  .search-container-two { 
    display: flex;           /* show desktop search bar */
    justify-content: center; /* center search bar */
    width: 100%;
  }

  .search-container { 
    display: none;           /* hide mobile search bar */
  }

  /* ADD: search form width */
  .search-container-two form {
    width: 100%;
    max-width: 500px; /* prevent stretching too wide */
    margin: 0 auto;   /* center search form */
  }

  .search-container-two input[type="text"] {
    width: 100%;
    padding: 0.6rem 1rem;
    font-size: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: var(--input-bg);
    color: var(--text-color);
  }

  .header-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .nav-buttons {
    display: flex;
    justify-content: flex-end; /* keeps login far right */
    align-items: center;
  }
}