.search-page { max-width: 900px; margin: 0 auto; padding: clamp(1rem, 4vw, 2rem) 0 0; }
.search-header { margin-bottom: clamp(1.5rem, 4vw, 2.5rem); text-align: left; }
.search-title { font-size: clamp(1.75rem, 6vw, 2.5rem); font-weight: 800; margin-bottom: var(--space-lg); color: var(--text-primary); }
.search-lede { margin: 0 0 var(--space-lg); color: var(--text-secondary); font-size: 1rem; max-width: 42rem; }
.search-form-large { max-width: 600px; margin: 0 auto; position: relative; }
.search-input-wrapper { display: grid; grid-template-columns: auto 1fr; align-items: stretch; background: var(--bg-card); border: 2px solid var(--border-light); border-radius: var(--radius-card); overflow: hidden; transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.search-input-wrapper:focus-within { border-color: var(--brand-primary); box-shadow: 0 0 0 4px rgba(217, 4, 41, 0.1); }
.search-form-large .search-icon { width: 20px; height: 20px; color: var(--text-muted); margin: 0 0 0 1rem; flex-shrink: 0; align-self: center; }
.search-input-large { flex: 1; background: transparent; border: none; padding: 1rem; font-size: 1.125rem; color: var(--text-primary); }
.search-input-large::placeholder { color: var(--text-muted); }
.search-input-large:focus { outline: none; }
.search-submit { grid-column: 1 / -1; background: var(--brand-primary); border: none; border-top: 1px solid rgba(255, 255, 255, 0.08); padding: 0.95rem 1.25rem; font-size: 0.98rem; font-weight: 700; color: white; cursor: pointer; transition: background-color 0.2s ease; }
.search-submit:hover { background: var(--brand-primary-hover); }
.search-hint { margin-top: var(--space-md); font-size: 0.875rem; color: var(--text-muted); }
.search-hint code { background: var(--bg-body); padding: 0.125rem 0.5rem; border-radius: var(--radius-sm); font-family: var(--font-mono), monospace; font-size: 0.8125rem; }
.autocomplete-dropdown { position: absolute; top: 100%; left: 0; right: 0; background: var(--bg-card); border: 1px solid var(--border-light); border-top: none; border-radius: 0 0 var(--radius-md) var(--radius-md); box-shadow: var(--shadow-hover); z-index: 100; display: none; max-height: 400px; overflow-y: auto; }
.autocomplete-dropdown.active { display: block; }
.autocomplete-item { display: flex; align-items: center; justify-content: space-between; padding: var(--space-sm) var(--space-md); text-decoration: none; color: var(--text-primary); border-bottom: 1px solid var(--border-light); transition: background-color 0.15s ease; }
.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-item:hover,
.autocomplete-item.autocomplete-active { background: var(--bg-body); }
.autocomplete-title { font-weight: 500; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.autocomplete-category { font-size: 0.75rem; color: var(--text-muted); background: var(--bg-body); padding: 0.125rem 0.5rem; border-radius: var(--radius-sm); margin-left: var(--space-sm); flex-shrink: 0; }
.search-results-header { margin-bottom: var(--space-xl); padding-bottom: var(--space-lg); border-bottom: 1px solid var(--border-light); }
.search-status { font-size: 1.125rem; color: var(--text-secondary); margin: 0; }
.search-status strong { color: var(--text-primary); }
.search-suggestions { margin-top: var(--space-lg); padding: var(--space-lg); background: var(--bg-card); border-radius: var(--radius-card); border: 1px solid var(--border-light); }
.search-suggestions h3 { font-size: 1rem; font-weight: 600; margin-bottom: var(--space-md); color: var(--text-primary); }
.search-suggestions ul { list-style: none; padding: 0; margin: 0; }
.search-suggestions li { padding: 0.5rem 0; color: var(--text-secondary); font-size: 0.9375rem; }
.search-suggestions li::before { content: "•"; color: var(--brand-primary); margin-right: 0.75rem; }
.search-empty { text-align: center; padding: clamp(2rem, 8vw, 5rem); color: var(--text-muted); font-size: 1.125rem; }
.search-results { display: flex; flex-direction: column; gap: var(--space-lg); }
.search-result { display: flex; flex-direction: column; gap: 0; background: var(--bg-card); border: 1px solid var(--border-light); border-radius: var(--radius-card); overflow: hidden; transition: box-shadow 0.2s ease, border-color 0.2s ease; }
.search-result:hover { box-shadow: var(--shadow-hover); border-color: var(--border-medium); }
.result-image-wrapper { flex-shrink: 0; width: 100%; aspect-ratio: 16/9; overflow: hidden; }
.result-image { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; will-change: transform; }
.search-result:hover .result-image { transform: scale(1.05); }
.search-result.no-image { padding: clamp(1rem, 2vw, 1.5rem); }
.search-result.no-image .result-content { padding: 0; }
.result-content { flex: 1; padding: clamp(1rem, 2vw, 1.5rem); display: flex; flex-direction: column; }
.result-meta { display: flex; align-items: center; gap: 0.5rem; font-size: 0.8125rem; color: var(--text-muted); margin-bottom: var(--space-sm); }
.result-category { background: var(--brand-primary); color: white; padding: 0.125rem 0.5rem; border-radius: var(--radius-sm); font-size: 0.6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.result-category:hover { color: white; background: var(--brand-primary-hover); }
.meta-separator { color: var(--text-muted); }
.result-title { font-size: 1.25rem; font-weight: 700; line-height: 1.3; margin-bottom: var(--space-sm); }
.result-title a { color: var(--text-primary); }
.result-title a:hover { color: var(--brand-primary); }
.result-excerpt { font-size: 0.9375rem; color: var(--text-secondary); line-height: 1.6; margin-bottom: var(--space-md); flex-grow: 1; }
.result-excerpt-highlighted { font-size: 0.9375rem; color: var(--text-secondary); line-height: 1.7; }
.result-excerpt-highlighted mark,
.result-excerpt mark { background: linear-gradient(120deg, rgba(220, 38, 38, 0.15) 0%, rgba(220, 38, 38, 0.25) 100%); color: var(--text-primary); padding: 0.1em 0.25em; border-radius: 2px; font-weight: 500; }
.result-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.result-tag { font-size: 0.75rem; color: var(--brand-accent); background: rgba(58, 134, 255, 0.1); padding: 0.25rem 0.5rem; border-radius: var(--radius-sm); transition: background-color 0.2s ease; }
.result-tag:hover { background: rgba(58, 134, 255, 0.2); color: var(--brand-accent); }

@media (min-width: 768px) {
    .search-header { text-align: center; }
    .search-form-large { max-width: 680px; }
    .search-input-wrapper { grid-template-columns: auto 1fr auto; }
    .search-submit { grid-column: auto; border-top: none; border-left: 1px solid var(--border-light); }
    .search-result { flex-direction: row; }
    .result-image-wrapper { width: 320px; aspect-ratio: auto; align-self: stretch; }
}

@media (hover: hover) {
    .search-result { transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease; will-change: transform; }
    .search-result:hover { transform: translateY(-2px) translateZ(0); }
}
