/* ============================
   Global Search Bar
   ============================ */
.global-search-bar {
    margin-top: 1.5rem;
    position: relative;
    max-width: 600px;
}

.global-search-bar .search-form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.global-search-bar .search-input-wrapper {
    position: relative;
    flex: 1;
}

.global-search-bar .search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    font-size: 1rem;
    z-index: 2;
    pointer-events: none;
}

.global-search-bar .form-control {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    color: #333;
    padding: 12px 20px 12px 44px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.global-search-bar .form-control::placeholder {
    color: #999;
}

.global-search-bar .form-control:focus {
    border-color: #252775;
    box-shadow: 0 0 0 3px rgba(37, 39, 117, 0.2);
    background: #fff;
    color: #333;
    outline: none;
}

.global-search-bar .search-btn {
    border-radius: 50px;
    padding: 12px 28px;
    white-space: nowrap;
}

/* ============================
   Live Search Dropdown
   ============================ */
.search-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    z-index: 1050;
    max-height: 440px;
    overflow-y: auto;
    padding: 8px 0;
}

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

.search-dropdown .dropdown-section {
    padding: 4px 0;
}

.search-dropdown .dropdown-section-title {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #252775;
    padding: 8px 16px 4px;
    margin: 0;
}

.search-dropdown .dropdown-item-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: #555;
    text-decoration: none;
    transition: background 0.15s;
}

.search-dropdown .dropdown-item-link:hover {
    background: #f5f5f5;
    color: #333;
}

.search-dropdown .dropdown-item-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #eeeef5;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
    color: #252775;
}

.search-dropdown .dropdown-item-text {
    flex: 1;
    min-width: 0;
}

.search-dropdown .dropdown-item-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-dropdown .dropdown-item-desc {
    font-size: 0.75rem;
    color: #888;
    margin: 2px 0 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-dropdown .dropdown-footer {
    border-top: 1px solid #e9ecef;
    padding: 10px 16px;
    text-align: center;
}

.search-dropdown .dropdown-footer a {
    color: #252775;
    font-size: 0.85rem;
    text-decoration: none;
    font-weight: 500;
}

.search-dropdown .dropdown-footer a:hover {
    text-decoration: underline;
}

.search-dropdown .dropdown-no-results {
    padding: 20px 16px;
    text-align: center;
    color: #888;
    font-size: 0.9rem;
}

.search-dropdown .dropdown-loading {
    padding: 20px 16px;
    text-align: center;
    color: #999;
    font-size: 0.85rem;
}

/* ============================
   Search Results Page
   ============================ */
.search-results-section {
    padding: 3rem 0 5rem;
}

.search-section {
    margin-bottom: 3rem;
}

.search-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    border-bottom: 2px solid #252775;
    padding-bottom: 0.75rem;
}

.search-section .section-header h2 {
    font-size: 1.35rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-section .section-header h2 i {
    color: #252775;
}

.view-all-link {
    color: #252775;
    font-weight: 500;
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: gap 0.2s;
}

.view-all-link:hover {
    color: #1b1d5c;
    gap: 8px;
}

/* Results Grid */
.search-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
}

.search-result-card {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.search-result-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border-color: #252775;
    color: inherit;
}

.search-result-card .result-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.search-result-card .result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-result-card .result-content {
    flex: 1;
    min-width: 0;
}

.result-type {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #252775;
    margin-bottom: 4px;
}

.result-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 6px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.result-title mark {
    background: rgba(37, 39, 117, 0.15);
    color: #252775;
    padding: 0 2px;
    border-radius: 2px;
}


.result-category {
    display: inline-block;
    font-size: 0.7rem;
    padding: 2px 8px;
    background: #f0f0f0;
    border-radius: 4px;
    color: #555;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 4rem 1rem;
}

.no-results i {
    font-size: 3rem;
    color: #ccc;
    margin-bottom: 1rem;
    display: block;
}

.no-results h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.no-results p {
    color: #666;
    max-width: 500px;
    margin: 0 auto 1.5rem;
}

.quick-links {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================
   Responsive
   ============================ */
@media (max-width: 768px) {
    .search-results-grid {
        grid-template-columns: 1fr;
    }

    .global-search-bar .search-form {
        flex-direction: column;
    }

    .global-search-bar .search-btn {
        width: 100%;
    }

    .search-section .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .search-result-card .result-image {
        width: 60px;
        height: 60px;
    }
}

/* ============================
   Navbar Search Toggle
   ============================ */
.nav-search-toggle {
    background: none;
    border: none;
    color: #333;
    font-size: 1.15rem;
    padding: 6px;
    cursor: pointer;
    transition: color 0.2s;
}

.nav-search-toggle:hover {
    color: #252775;
}
