/* Search results (new page; styled like the directories and the about/legal heroes) */
.search-hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 40px 0 44px;
}

.search-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    text-align: center;
}

.search-form {
    max-width: 960px;
    margin: 0 auto;
}

.search-form .input-group-text {
    background: white;
    border: none;
    color: #6c757d;
}

.search-form .form-control,
.search-form .form-select {
    border: none;
    box-shadow: none;
}

.search-form .form-control:focus,
.search-form .form-select:focus {
    box-shadow: 0 0 0 0.2rem rgba(224, 164, 88, 0.45);
}

.btn-search {
    background: linear-gradient(135deg, var(--accent-color), #d09347);
    border: none;
    color: var(--primary-color);
    font-weight: 700;
    transition: all 0.3s ease;
}

.btn-search:hover,
.btn-search:focus {
    background: linear-gradient(135deg, #d09347, var(--accent-color));
    color: var(--primary-color);
    box-shadow: 0 8px 25px rgba(224, 164, 88, 0.4);
}

.search-results {
    max-width: 1200px;
    padding-top: 2rem;
}

/* Type tabs */
.search-tabs {
    gap: 0.5rem;
    flex-wrap: wrap;
}

.search-tabs .nav-link {
    border-radius: 20px;
    background-color: #e9ecef;
    color: #495057;
    font-weight: 500;
    padding: 0.4rem 1.1rem;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.search-tabs .nav-link:hover {
    border-color: var(--accent-color);
    color: var(--primary-color);
}

.search-tabs .nav-link.active {
    background-color: var(--primary-color);
    color: white;
}

.search-tabs .badge {
    background: rgba(0,0,0,0.12);
    color: inherit;
    font-weight: 600;
}

.search-tabs .nav-link.active .badge {
    background: var(--accent-color);
    color: var(--primary-color);
}

.results-summary {
    color: #6c757d;
    margin-bottom: 1.5rem;
    overflow-wrap: anywhere;
}

.results-section {
    margin-bottom: 3rem;
    scroll-margin-top: 1rem;
}

.results-heading {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.5rem;
    border-bottom: 3px solid var(--accent-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.results-heading h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.results-count {
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 600;
    background: var(--light-color);
    color: var(--secondary-color);
    border: 1px solid #dee2e6;
    border-radius: 20px;
    padding: 0.1rem 0.65rem;
    vertical-align: middle;
}

/* Result cards */
.result-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.result-card:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.min-w-0 {
    min-width: 0;
}

.result-logo,
.result-avatar {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    object-fit: cover;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
}

.result-logo {
    border-radius: 12px;
}

.result-avatar {
    border-radius: 50%;
}

.result-logo-empty,
.result-avatar-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    color: white;
    border: none;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.result-title {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.35rem;
    overflow-wrap: anywhere;
}

.result-title a {
    color: #1a1a1a;
    text-decoration: none;
}

.result-card:hover .result-title a {
    color: var(--secondary-color);
}

.result-tagline {
    color: #6c757d;
    font-style: italic;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    overflow-wrap: anywhere;
}

.result-text {
    color: #495057;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
    overflow-wrap: anywhere;
}

.result-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}

.result-badges .badge {
    font-weight: 500;
    padding: 0.4rem 0.7rem;
    border-radius: 6px;
}

.result-meta {
    color: #6c757d;
    font-size: 0.85rem;
}

.result-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}

.skill-chip {
    background: #1a1a1a;
    color: white;
    padding: 0.25rem 0.7rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 500;
}

.skill-chip.skill-more {
    background: #e9ecef;
    color: #495057;
}

.result-link {
    margin-top: auto;
    padding-top: 0.5rem;
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 0.9rem;
}

.result-card:hover .result-link i {
    transform: translateX(3px);
}

.result-link i {
    transition: transform 0.2s ease;
}

/* Pagination */
.pagination .page-link {
    color: var(--primary-color);
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Empty states */
.search-empty {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.06);
    padding: 3rem 1.5rem;
    text-align: center;
    margin-bottom: 2rem;
    overflow-wrap: anywhere;
}

.search-empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.25rem;
    border-radius: 50%;
    background: var(--accent-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.search-empty h2 {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.75rem;
}

.section-empty {
    background: white;
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    padding: 2rem 1rem;
    text-align: center;
    color: #6c757d;
    overflow-wrap: anywhere;
}

.section-empty > i {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    color: #adb5bd;
}

@media (max-width: 576px) {
    .search-hero h1 { font-size: 2rem; }
    .result-card { padding: 1.25rem; }
}
