/* ─── BASE SEARCH STYLES (all viewports) ─── */
.site-search {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0 20px !important;
}

.site-search input {
  border: none;
  width: 100%;
  padding: 8px 36px 8px 14px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-body);
  /*background: var(--white);*/
  color: var(--text-primary);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
  box-sizing: border-box;
}

.site-search input:focus {
  border: solid 1px var(--gold);
  /*box-shadow: 0 0 0 3px rgba(200, 162, 79, 0.12);*/
}

.site-search .search-icon svg{
  width: 20px;
  height: auto;
}

/* ─── DROPDOWN (container-relative, placeable anywhere) ─── */
.search-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: 100%;                 /* matches parent .site-search width */
  min-width: 260px;            /* prevents crushing on tiny containers */
  background: var(--white);
  border: 1px solid var(--border);
  box-shadow: 0 12px 40px rgba(10, 35, 66, 0.10);
  display: none;
  z-index: 1000;
  max-height: 480px;
  overflow-y: auto;
  border-radius: 4px;
}

.search-dropdown.active { display: block; }

.search-dropdown .dropdown-header {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-white);
  background-color: var(--gold);
}

.search-result-item {
  display: block;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  cursor: pointer;
}

.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--cream); }
.search-result-item:hover .result-title { color: var(--gold); }

.search-result-item .result-category {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gold);
  margin-bottom: 4px;
}

.search-result-item .result-title {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 500;
  color: var(--navy);
  margin: 0 0 4px 0;
  line-height: 1.3;
  transition: color 0.2s;
}

.search-result-item .result-snippet {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-result-item mark {
  background: rgba(200, 162, 79, 0.15);
  color: var(--navy);
  font-weight: 500;
  padding: 0 2px;
  border-radius: 2px;
}

.search-dropdown .dropdown-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.search-dropdown .dropdown-footer a {
  font-size: 13px;
  font-weight: 500;
  color: var(--gold);
  text-decoration: none;
  transition: color 0.2s;
}

.search-dropdown .dropdown-footer a:hover { color: var(--navy); }

.search-dropdown .no-results {
  padding: 30px 18px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

/* ─── MOBILE ─── */
@media (max-width: 759px) {
  .site-search { margin: 0; }
  .site-search input:focus { width: 100%; }
  .search-dropdown { border-radius: 0; }

  .site-search .search-icon {
    position: absolute;
    top: 17px;
    right: 30px;
    color: var(--text-muted);
    font-size: 14px;
    pointer-events: none;
  }
}

/* ─── DESKTOP ─── */
@media (min-width: 760px) {
  .site-search { margin: 0 0 0 auto; }

  .site-search input { 
    width: 300px; 
    border: none;
    width: 100%;
    padding: 8px 36px 8px 14px;
    border-bottom: 1px solid var(--border);
    font-family: var(--font-body);
    /*background: var(--white);*/
    color: var(--text-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    box-sizing: border-box;
  }

  .site-search input:focus { 
    width: 280px; 
    border: solid 1px var(--gold);
  }

  .site-search .search-icon {
    position: absolute;  
    top: 10px;
    right: 30px;
    color: var(--text-muted);
    font-size: 14px;
    pointer-events: none;
  }
}