/* Search Page Specific Styles */

.search-hero {
    position: relative;
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 100px;
    overflow: hidden;
}

.search-hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.search-hero-background .hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    opacity: 1;
    filter: none;
}

.search-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.3) 0%, rgba(31, 41, 55, 0.2) 100%);
    z-index: 1;
}

.search-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
}

.search-hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.search-hero-title i {
    color: #00bfff;
    font-size: 3rem;
}

.search-hero-subtitle {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.8);
}

.search-section {
    padding: 4rem 0;
    background: var(--bg-darker);
    position: relative;
}

.jobs-results-section {
    padding: 4rem 0;
    background: var(--bg-light);
    min-height: 50vh;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.results-header-left h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.results-count {
    font-size: 1.1rem;
    color: var(--text-light);
    font-weight: 500;
}

.results-header-right {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.view-toggle {
    display: flex;
    gap: 0.5rem;
    background: var(--bg-white);
    padding: 4px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.view-btn {
    padding: 8px 16px;
    background: transparent;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.view-btn.active {
    background: var(--gradient-primary);
    color: white;
}

.view-btn:hover {
    color: var(--primary-color);
}

.export-btn {
    padding: 10px 20px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    color: var(--text-dark);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.export-btn:hover {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
}

.jobs-container {
    position: relative;
}

.jobs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.jobs-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.jobs-list .job-card {
    display: flex;
    flex-direction: row;
    max-width: 100%;
}

.jobs-list .job-card-image {
    width: 300px;
    height: 200px;
    flex-shrink: 0;
}

.jobs-list .job-content {
    flex: 1;
    padding: 2rem;
}

.pagination-container {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.pagination-btn {
    padding: 10px 16px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    color: var(--text-dark);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.pagination-btn:hover {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
}

.pagination-btn.active {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-light);
}

.no-results-icon {
    margin-bottom: 1.5rem;
}

.no-results-icon i {
    font-size: 4rem;
    color: var(--text-light);
    opacity: 0.5;
}

.no-results h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.clear-search-btn {
    margin-top: 1.5rem;
    padding: 12px 24px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.clear-search-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.loading-results {
    text-align: center;
    padding: 4rem 2rem;
}

.loading-spinner {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 1rem;
}

.spinner-ring {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary-color);
    animation: spinnerBounce 1.4s infinite ease-in-out both;
}

.spinner-ring:nth-child(1) {
    animation-delay: -0.32s;
}

.spinner-ring:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes spinnerBounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

/* Search Header Enhancements */
.search-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
    flex-wrap: wrap;
    gap: 1rem;
}

.search-header-left {
    flex: 1;
}

.search-header-left h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0.5rem;
}

.search-stats {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--bg-light);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-light);
    border: 1px solid var(--border-color);
}

.stat-badge i {
    color: var(--primary-color);
}

.search-header-right {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.save-search-btn {
    padding: 10px 14px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    color: var(--text-dark);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.save-search-btn:hover {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
}

.save-search-btn.saved {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
}

.advanced-toggle {
    padding: 10px 18px;
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-dark);
    position: relative;
}

.advanced-toggle:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.filter-count {
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    margin-left: 4px;
}

.filter-count:empty {
    display: none;
}

/* Active Filters */
.active-filters {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.active-filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--text-dark);
}

.clear-all-filters {
    padding: 4px 12px;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-light);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.clear-all-filters:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.active-filters-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.active-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.active-filter-tag .remove-filter {
    cursor: pointer;
    margin-left: 4px;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.active-filter-tag .remove-filter:hover {
    opacity: 1;
}

/* Advanced Filters */
.advanced-filters {
    margin-top: 2rem;
    padding: 2rem;
    background: var(--bg-light);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    animation: slideDown 0.4s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.filter-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1rem;
}

.filter-group label i {
    color: var(--primary-color);
}

.range-slider-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.range-inputs {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.range-inputs input {
    flex: 1;
    padding: 10px 14px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-darker);
    color: var(--text-dark);
    font-size: 0.9rem;
}

.range-inputs span {
    color: var(--text-light);
    font-weight: 600;
}

.range-slider {
    position: relative;
    padding: 20px 0;
}

.range-slider input[type="range"] {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: var(--bg-light);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.range-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--gradient-primary);
    cursor: pointer;
    box-shadow: var(--shadow-md);
}

.range-slider input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--gradient-primary);
    cursor: pointer;
    border: none;
    box-shadow: var(--shadow-md);
}

.range-values {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 0.5rem;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s;
}

.checkbox-item:hover {
    background: var(--bg-light);
}

.checkbox-item input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.checkbox-item input[type="checkbox"]:checked + .checkmark {
    background: var(--gradient-primary);
    border-color: transparent;
}

.checkbox-item input[type="checkbox"]:checked + .checkmark::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.radio-item {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s;
}

.radio-item:hover {
    background: var(--bg-light);
}

.radio-item input[type="radio"] {
    display: none;
}

.radiomark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.radio-item input[type="radio"]:checked + .radiomark {
    border-color: var(--primary-color);
}

.radio-item input[type="radio"]:checked + .radiomark::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--gradient-primary);
}

.sort-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-darker);
    color: var(--text-dark);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2300bfff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.sort-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 191, 255, 0.15);
}

.toggle-switch {
    display: flex;
    align-items: center;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.toggle-slider {
    width: 50px;
    height: 26px;
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: 26px;
    position: relative;
    transition: all 0.3s ease;
}

.toggle-slider::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    background: var(--text-light);
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: all 0.3s ease;
}

.toggle-switch input[type="checkbox"]:checked + .toggle-label .toggle-slider {
    background: var(--gradient-primary);
    border-color: transparent;
}

.toggle-switch input[type="checkbox"]:checked + .toggle-label .toggle-slider::after {
    transform: translateX(24px);
    background: white;
}

.toggle-text {
    font-weight: 500;
    color: var(--text-dark);
}

/* Quick Filters */
.quick-filters {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.quick-filters-header {
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.filter-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.filter-tag {
    padding: 10px 20px;
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: 24px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-dark);
    font-weight: 500;
}

.filter-tag:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.filter-tag.active {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    box-shadow: var(--shadow-md);
    transform: scale(1.05);
}

.filter-tag i {
    font-size: 0.85rem;
}

/* Search Field Enhancements */
.search-field-main {
    position: relative;
}

.clear-search {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-light);
    border: none;
    color: var(--text-light);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2;
}

.clear-search:hover {
    background: var(--primary-color);
    color: white;
}

.search-loader {
    display: inline-flex;
    align-items: center;
    margin-left: 10px;
}

.search-loader .spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.location-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-top: 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: var(--shadow-xl);
}

.location-suggestions.active {
    display: block;
    animation: slideDown 0.3s ease-out;
}

.location-suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    color: var(--text-dark);
    transition: background 0.2s;
    border-bottom: 1px solid var(--border-color);
}

.location-suggestion-item:last-child {
    border-bottom: none;
}

.location-suggestion-item:hover {
    background: var(--bg-light);
}

/* Sliding Animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-up {
    animation: slideInUp 0.8s ease-out forwards;
}

.slide-in-left {
    animation: slideInLeft 0.8s ease-out forwards;
}

.slide-in-right {
    animation: slideInRight 0.8s ease-out forwards;
}

/* Job Card Animation */
.job-card {
    animation: slideInUp 0.6s ease-out forwards;
    opacity: 0;
}

.job-card:nth-child(1) {
    animation-delay: 0.1s;
}

.job-card:nth-child(2) {
    animation-delay: 0.2s;
}

.job-card:nth-child(3) {
    animation-delay: 0.3s;
}

.job-card:nth-child(4) {
    animation-delay: 0.4s;
}

.job-card:nth-child(5) {
    animation-delay: 0.5s;
}

.job-card:nth-child(6) {
    animation-delay: 0.6s;
}

/* Saved Searches Modal */
.saved-searches-modal {
    max-width: 600px;
}

.saved-searches-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.saved-search-item {
    padding: 1rem;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.saved-search-item:hover {
    background: var(--bg-white);
    border-color: var(--primary-color);
    transform: translateX(5px);
}

.saved-search-info {
    flex: 1;
}

.saved-search-name {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.saved-search-params {
    font-size: 0.85rem;
    color: var(--text-light);
}

.saved-search-actions {
    display: flex;
    gap: 0.5rem;
}

.saved-search-btn {
    padding: 8px 16px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.saved-search-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.delete-search-btn {
    padding: 8px 12px;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-light);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.delete-search-btn:hover {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
}

/* Responsive */
@media (max-width: 768px) {
    .search-hero-title {
        font-size: 2.5rem;
    }
    
    .search-hero-title i {
        font-size: 2rem;
    }
    
    .search-hero-subtitle {
        font-size: 1.1rem;
    }
    
    .results-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .results-header-left h2 {
        font-size: 2rem;
    }
    
    .jobs-grid {
        grid-template-columns: 1fr;
    }
    
    .filters-grid {
        grid-template-columns: 1fr;
    }
    
    .jobs-list .job-card {
        flex-direction: column;
    }
    
    .jobs-list .job-card-image {
        width: 100%;
        height: 200px;
    }
    
    .search-header {
        flex-direction: column;
    }
    
    .search-header-right {
        width: 100%;
        justify-content: space-between;
    }
}
