.result-title-tooltip {
    position: fixed;
    z-index: 9999;
    background: var(--primary-color);
    color: #fff;
    font-size: 0.92rem;
    padding: 6px 14px;
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--shadow-primary);
    pointer-events: none;
    white-space: nowrap;
    opacity: 0.97;
    transition: opacity 0.15s;
}
/* Deep Search Page Specific Styles */
/* Note: Common styles (body, header, container) are in landing.css */

/* ---------- Layout ---------- */
.container {
    max-width: 1400px;
}

.search-hero p {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: auto;
    white-space: pre-line;
}

/* ---------- Search Box ---------- */
.search-container {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.search-wrapper {
    position: relative;
    width: 100%;
    max-width: 369px;
}

.search-icon {
    position: absolute;
    left: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.search-input {
    width: 100%;
    min-width: 250px;
    padding: 0.75rem 3rem 0.75rem 3rem;
    border-radius: 30px;
    border: 2px solid var(--primary-dark);
    background: var(--bg-primary);
    color: var(--text-primary);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 4px 16px var(--shadow-primary);
}

.clear-search {
    position: absolute;
    right: 1rem;
    top: 22%;
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 0.25rem;
    display: none;
    transition: all 0.2s ease;
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.clear-search:hover {
    color: var(--primary-color);
    background: var(--shadow-primary);
}

.clear-search.visible {
    display: block;
}

.search-btn {
    padding: 0.7rem 1.6rem;
    border-radius: 30px;
    border: none;
    background: var(--gradient-button);
    color: white;
    font-weight: 600;
    cursor: pointer;
}

/* ---------- Results Meta ---------- */
.results-meta {
    text-align: center;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 1rem;
    display: none;
}

.results-meta.visible {
    display: block;
}

/* ---------- Results Grid ---------- */
#results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 1rem;
    padding: 0 1rem 3rem 1rem;
}

/* ---------- Result Card ---------- */
.result-card {
    background: var(--bg-secondary);
    border-radius: 14px;
    padding: 1rem;
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 3px 10px var(--shadow-light);
    cursor: default;
    transition: all 0.35s ease;
    max-height: 200px;
    overflow: hidden;
    position: relative;
}
.result-card.expandable {
    cursor: pointer;
}

.result-card:hover {
    transform: translateY(-4px);
}

.result-card::after {
    display: none;
}
.result-card.expandable::after {
    content: var(--expand-text, "Click to expand");
    width: fit-content;
    position: sticky;
    bottom: 0;
    margin-top: 10px;
    font-size: 0.65rem;
    color: var(--highlight-text);
    font-weight: 600;
    background: var(--highlight-bg);
    padding: 2px 10px;
    border-radius: 8px;
    box-shadow: 0 1px 4px var(--shadow-primary);
    display: block;
}

.result-card.expanded {
    max-height: 1200px;
    overflow-y: auto;
}

.result-card.expanded::after {
    content: var(--collapse-text, "Click to collapse");
    color: #d97706;
    background: #fff7ed;
    position: sticky;
    bottom: 0;
    margin-top: 10px;
}

/* ---------- Content ---------- */
.result-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
    cursor: pointer;
    padding: 2px 8px;
    border-left: 4px solid var(--primary-dark);
    outline: none;
    display: block;
}
.result-title:hover, .result-title:focus {
    color: var(--primary-dark);
    border-left: 4px solid var(--primary-color);
}

.result-text {
    font-size: 0.82rem;
    line-height: 1.55;
    color: var(--text-secondary);
}

/* ---------- Highlight ---------- */
mark.search-highlight {
    background: linear-gradient(135deg, #ffcccc, #ff9999);
    padding: 0 3px;
    border-radius: 3px;
}

/* ---------- Category Filter ---------- */
.category-filter {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 2px solid var(--primary-dark);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    min-width: 200px;
    transition: all 0.2s ease;
}

.category-filter:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.category-filter:not(:disabled):hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px var(--shadow-primary);
}

.category-filter:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px var(--shadow-primary);
}

/* ---------- Category Badge ---------- */
.category-badge {
    display: inline-block;
    font-size: 0.7rem;
    padding: 3px 8px;
    background: var(--primary-color);
    color: white;
    border-radius: 12px;
    margin-bottom: 0.5rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* ---------- Empty ---------- */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: 14px;
}
