/* ========================================
   Search Page Styles
   ======================================== */

/* ========================================
   Header Search Dropdown (Quick Search)
   ======================================== */

.header-search-wrapper {
    position: relative;
}

.header-search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 0.5rem;
    background: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid #e9ecef;
    z-index: 1050;
    display: none;
    overflow: hidden;
    min-width: 300px;
}

.header-search-dropdown.show {
    display: block;
    animation: dropdownFadeIn 0.15s ease-out;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-dropdown-list {
    max-height: 350px;
    overflow-y: auto;
}

.search-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--bs-dark);
    border-bottom: 1px solid #f1f3f4;
    transition: background-color 0.15s ease;
}

.search-dropdown-item:last-child {
    border-bottom: none;
}

.search-dropdown-item:hover,
.search-dropdown-item.active {
    background-color: #f8f9fa;
    color: var(--bs-primary);
}

.search-dropdown-item .dropdown-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bs-primary);
    color: #fff;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    flex-shrink: 0;
}

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

.search-dropdown-item .dropdown-title {
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0;
    line-height: 1.3;
}

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

.search-dropdown-item .dropdown-arrow {
    color: #adb5bd;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.search-dropdown-item:hover .dropdown-arrow {
    color: var(--bs-primary);
}

.search-dropdown-empty {
    padding: 1.5rem 1rem;
    text-align: center;
    color: #6c757d;
    font-size: 0.875rem;
}

.search-dropdown-footer {
    padding: 0.625rem 1rem;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    text-align: center;
}

.search-dropdown-footer a {
    font-size: 0.8rem;
    color: var(--bs-primary);
    text-decoration: none;
    font-weight: 500;
}

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

/* ========================================
   Search Page Container
   ======================================== */

.search-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* ========================================
   Header & Search Form
   ======================================== */

.search-header {
    text-align: center;
    margin-bottom: 2rem;
}

.search-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--bs-dark);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.search-title i {
    color: var(--bs-primary);
}

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

.search-form-large .input-group {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    overflow: hidden;
}

.search-form-large .form-control {
    border: 2px solid #e9ecef;
    border-right: none;
    padding: 0.75rem 1.25rem;
    font-size: 1.1rem;
}

.search-form-large .form-control:focus {
    border-color: var(--bs-primary);
    box-shadow: none;
}

.search-form-large .btn {
    padding: 0.75rem 1.5rem;
    font-weight: 500;
}

/* ========================================
   Search Info & Stats
   ======================================== */

.search-info {
    margin-bottom: 1.5rem;
}

.search-stats {
    color: #6c757d;
    font-size: 0.95rem;
    margin: 0;
}

/* ========================================
   No Results
   ======================================== */

.search-no-results {
    text-align: center;
    padding: 3rem 1rem;
    background: #f8f9fa;
    border-radius: 1rem;
}

.search-no-results i {
    font-size: 4rem;
    color: #dee2e6;
    margin-bottom: 1rem;
}

.search-no-results h3 {
    font-size: 1.5rem;
    color: var(--bs-dark);
    margin-bottom: 0.5rem;
}

.search-no-results p {
    margin-bottom: 0.25rem;
}

/* ========================================
   Result Sections
   ======================================== */

.search-results {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.result-section {
    background: #fff;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #e9ecef;
}

.section-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--bs-dark);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e9ecef;
}

.section-title i {
    font-size: 1.25rem;
}

.section-title .badge {
    font-size: 0.75rem;
    font-weight: 500;
    margin-left: auto;
}

/* ========================================
   Result List & Items
   ======================================== */

.result-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.result-list-pages {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 0.75rem;
}

.result-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 0.75rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.result-item:hover {
    background: #fff;
    border-color: var(--bs-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.result-item:hover .result-title {
    color: var(--bs-primary);
}

/* Result Icon */
.result-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bs-primary);
    color: #fff;
    border-radius: 0.5rem;
    font-size: 1.25rem;
}

.result-icon-news {
    background: #0d6efd;
}

.result-icon-vacancy {
    background: #198754;
}

/* Result Image */
.result-image {
    flex-shrink: 0;
    width: 80px;
    height: 60px;
    border-radius: 0.5rem;
    overflow: hidden;
    background: #e9ecef;
}

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

/* Result Content */
.result-content {
    flex: 1;
    min-width: 0;
}

.result-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--bs-dark);
    margin: 0 0 0.25rem 0;
    line-height: 1.3;
    transition: color 0.2s ease;
}

.result-description {
    font-size: 0.875rem;
    color: #6c757d;
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.result-meta {
    font-size: 0.8rem;
    color: #adb5bd;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.result-meta i {
    font-size: 0.75rem;
}

/* Result Arrow (for pages) */
.result-arrow {
    flex-shrink: 0;
    color: #adb5bd;
    font-size: 1rem;
    align-self: center;
    transition: transform 0.2s ease;
}

.result-item:hover .result-arrow {
    transform: translateX(4px);
    color: var(--bs-primary);
}

/* Page Result Item */
.result-item-page {
    padding: 0.875rem;
}

.result-item-page .result-icon {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
}

.result-item-page .result-title {
    font-size: 0.95rem;
}

.result-item-page .result-description {
    font-size: 0.8rem;
    margin-bottom: 0;
    -webkit-line-clamp: 1;
}

/* ========================================
   Search Hints (Empty State)
   ======================================== */

.search-hints {
    text-align: center;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 1rem;
}

.search-hints h3 {
    font-size: 1.1rem;
    color: #6c757d;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

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

.hint-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: #fff;
    color: var(--bs-dark);
    text-decoration: none;
    border-radius: 2rem;
    font-size: 0.95rem;
    font-weight: 500;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

.hint-link:hover {
    background: var(--bs-primary);
    color: #fff;
    border-color: var(--bs-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

.hint-link i {
    font-size: 1.1rem;
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 768px) {
    .search-page {
        padding: 1rem;
    }

    .search-title {
        font-size: 1.5rem;
    }

    .search-form-large .form-control {
        font-size: 1rem;
        padding: 0.625rem 1rem;
    }

    .search-form-large .btn {
        padding: 0.625rem 1rem;
    }

    .search-form-large .btn span {
        display: none;
    }

    .result-section {
        padding: 1rem;
    }

    .result-list-pages {
        grid-template-columns: 1fr;
    }

    .result-item {
        padding: 0.875rem;
    }

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

    .result-icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    .hint-links {
        gap: 0.5rem;
    }

    .hint-link {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .search-title {
        font-size: 1.25rem;
    }

    .section-title {
        font-size: 1rem;
    }

    .result-title {
        font-size: 0.95rem;
    }

    .result-description {
        font-size: 0.8rem;
        -webkit-line-clamp: 1;
    }
}
