/* ============================================================
   WhiteStudio.team — Search results page
   Builds on styles.css (brand tokens, nav, footer, buttons)
   ============================================================ */

/* ---------- Search header ---------- */
.sr-head {
  padding: 48px 0 28px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 720px 320px at 50% -20%, rgba(101, 46, 186, 0.12), transparent 62%),
    var(--surface);
  border-bottom: 1px solid var(--line);
}
.sr-head::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 60% 100% at 50% 0%, #000 0%, transparent 75%);
  opacity: 0.3;
  pointer-events: none;
}
.sr-head > .container { position: relative; z-index: 1; }
.sr-head .eyebrow { margin-bottom: 16px; }

/* Search bar */
.sr-search {
  position: relative;
  max-width: 640px;
}
.sr-search svg.s-ic {
  position: absolute;
  left: 18px; top: 50%;
  transform: translateY(-50%);
  width: 20px; height: 20px;
  color: var(--ink-4);
  pointer-events: none;
}
.sr-search input {
  width: 100%;
  height: 58px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 14px;
  padding: 0 122px 0 50px;
  font: 16px var(--bs-body-font-family);
  color: var(--ink-1);
  outline: none;
  box-shadow: var(--shadow-md);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.sr-search input::placeholder { color: var(--ink-4); }
.sr-search input:focus {
  border-color: var(--brand-purple);
  box-shadow: 0 0 0 3px rgba(101, 46, 186, 0.12), var(--shadow-md);
}
.sr-search .s-go {
  position: absolute;
  right: 7px; top: 7px;
  height: 44px;
  padding: 0 22px;
  border: 0;
  border-radius: 9px;
  background: var(--brand-gradient);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
}
.sr-count {
  font-size: 14.5px;
  color: var(--ink-3);
  margin: 18px 0 0;
}
.sr-count strong { color: var(--ink-1); }
.sr-count .q { color: var(--brand-purple); font-weight: 700; }

/* ---------- Body layout ---------- */
.sr-body { margin: 0; }
.sr-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 36px;
  align-items: start;
}

/* Sidebar filters */
.sr-side {
  position: sticky;
  top: 88px;
}
.sr-side .s-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--ink-4);
  margin-bottom: 12px;
}
.sr-filter {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 26px;
}
.sr-filter button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 9px 12px;
  border: 0;
  background: transparent;
  border-radius: 9px;
  font: 500 14px var(--bs-body-font-family);
  color: var(--ink-2);
  cursor: pointer;
  transition: background .12s ease, color .12s ease;
}
.sr-filter button:hover { background: var(--surface-2); }
.sr-filter button.active {
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-weight: 600;
}
.sr-filter button .n {
  font-size: 12px;
  color: var(--ink-4);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 1px 8px;
  font-weight: 600;
}
.sr-filter button.active .n {
  background: var(--surface);
  border-color: transparent;
  color: var(--brand-purple);
}

.sr-tip {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}
.sr-tip h4 { font-size: 13px; margin: 0 0 6px; font-weight: 600; }
.sr-tip p { font-size: 12.5px; color: var(--ink-4); margin: 0 0 12px; line-height: 1.5; }
.sr-tip a { font-size: 13px; font-weight: 600; }

/* Results list */
.sr-list { display: flex; flex-direction: column; }
.sr-item {
  display: block;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
  transition: padding-left .15s ease;
}
.sr-item:first-child { border-top: 0; padding-top: 4px; }
.sr-item:hover { padding-left: 8px; }
.sr-crumb {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--ink-4);
  margin-bottom: 8px;
}
.sr-crumb .badge-cat {
  background: var(--accent-soft);
  color: var(--accent-ink);
  border-radius: 6px;
  padding: 2px 8px;
  font-weight: 600;
  font-size: 11.5px;
  text-transform: capitalize;
}
.sr-crumb .sep { color: var(--line); }
.sr-item h3 {
  font-size: 19px;
  margin: 0 0 7px;
  font-weight: 600;
  color: var(--ink-1);
  letter-spacing: -0.01em;
  transition: color .12s ease;
}
.sr-item:hover h3 { color: var(--brand-purple); }
.sr-item p {
  font-size: 14.5px;
  color: var(--ink-3);
  margin: 0;
  line-height: 1.6;
  max-width: 68ch;
}
.sr-item mark {
  background: var(--brand-pink-soft);
  color: var(--accent-ink);
  padding: 0 2px;
  border-radius: 3px;
  font-weight: 600;
}
[data-theme="dark"] .sr-item mark { background: rgba(255, 75, 147, 0.22); color: #ffd0e3; }
.sr-item .sr-url {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--brand-purple);
  margin-top: 10px;
  font-weight: 500;
}
.sr-item .sr-url svg { width: 13px; height: 13px; }

/* Pagination */
.sr-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.sr-pager a, .sr-pager span {
  min-width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
  text-decoration: none;
  background: var(--surface);
  transition: all .12s ease;
}
.sr-pager a:hover { border-color: var(--brand-purple); color: var(--brand-purple); }
.sr-pager .current {
  background: var(--brand-gradient);
  border-color: transparent;
  color: #fff;
}
.sr-pager .gap { border: 0; background: transparent; color: var(--ink-4); min-width: 24px; }
.sr-pager .nav-btn { gap: 7px; }
.sr-pager .nav-btn svg { width: 15px; height: 15px; }
.sr-pager .disabled { opacity: .4; pointer-events: none; }

@media (max-width: 860px) {
  .sr-grid { grid-template-columns: 1fr; gap: 24px; }
  .sr-side { position: static; }
  .sr-filter { flex-direction: row; flex-wrap: wrap; gap: 8px; }
  .sr-filter button { width: auto; border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; }
  .sr-tip { display: none; }
}
@media (max-width: 575px) {
  .sr-search .s-go { display: none; }
  .sr-search input { padding-right: 16px; }
}

