/* Header Styles */
.header {
  background-color: var(--brand-primary);
  color: var(--brand-text);
  padding: 10px 0;
  transition: box-shadow 0.3s ease;
  border-bottom: 1px solid #eee;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
}

.header.scrolled {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.header a {
  color: var(--brand-text);
  text-decoration: none;
  transition: color 0.3s ease;
}

.header a:hover {
  color: var(--brand-accent);
}

.navbar-brand {
  font-size: 2.5rem;
  margin-right: 1rem;
}

.navbar .nav-item.active .nav-link {
  font-weight: bold;
}

.navbar .nav-link.btn-gold {
  padding: .5rem 1rem;
  color: #111;
}

.navbar .nav-item.active .nav-link.btn-gold {
  background: #111;
  color: var(--brand-accent);
  border: 1px solid var(--brand-accent);
}

.navbar .dropdown-menu {
  background-color: var(--brand-primary);
  border: 1px solid rgba(0,0,0,0.1);
}

.navbar .dropdown-item {
  color: var(--brand-text);
}

.navbar .dropdown-item:hover {
  background-color: var(--brand-secondary);
  color: var(--brand-accent);
}

/* --- Search Bar --- */
.search-container {
  position: relative;
}

#search-input {
  background-color: var(--brand-secondary);
  border: 1px solid transparent;
  border-radius: 20px;
  padding-right: 45px; /* Space for the icon */
  height: 40px;
  width: 150px; /* Initial width */
  transition: width 0.4s ease-in-out, background-color 0.3s ease;
}

#search-input:focus {
  background-color: var(--brand-primary);
  border-color: var(--brand-accent);
  width: 200px; /* Expanded width */
  outline: none;
  box-shadow: none;
}

.search-container button {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: 45px;
  background: transparent;
  border: none;
}

.search-container .search-icon {
  color: var(--brand-muted);
}

.search-container button:focus, .search-container button:active {
    outline: none;
    box-shadow: none;
}

/* Responsive Header */
@media (max-width: 991.98px) {
  .navbar-brand {
    font-size: 2rem;
  }

  .navbar-collapse {
    margin-top: 15px;
  }

  .navbar-nav .nav-item {
    margin: 5px 0;
  }

  #search-input {
    width: 100%;
  }

  #search-input:focus {
    width: 100%;
  }
}
