/* Job Listing Page Styles */

/* Search Section */
.search-section {
    background: linear-gradient(135deg, #4FC3F7 0%, #29B6F6 100%);
    color: white;
    padding: 80px 0 60px;
    text-align: center;
}

.search-section h1 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 30px;
}

.search-section .search-container {
    max-width: 800px;
    margin: 0 auto;
}

.search-section .search-box {
    display: flex;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.search-section .search-input,
.search-section .location-input {
    flex: 1;
    padding: 20px 25px;
    border: none;
    outline: none;
    font-size: 16px;
    color: #333;
    background: transparent;
}

.search-section .location-input {
    border-left: 1px solid rgba(0, 0, 0, 0.1);
}

.search-section .search-btn {
    background: #4FC3F7;
    color: white;
    border: none;
    padding: 20px 35px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-section .search-btn:hover {
    background: #29B6F6;
}

/* Main Content Layout */
.main-content {
    background: #f8f9fc;
    padding: 40px 0;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    align-items: start;
}

/* Filters Sidebar */
.filters-sidebar {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 100px;
    height: fit-content;
}

.filter-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.filter-section h3 {
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.apply-filters {
    background: #4FC3F7;
    color: white;
    border: none;
    border-radius: 25px;
    padding: 12px 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 15px;
    width: 100%;
    transition: background-color 0.3s ease;
}

.apply-filters:hover {
    background: #29B6F6;
}

.clear-filters {
    background: none;
    border: none;
    color: #4FC3F7;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: underline;
    display: block;
    width: 100%;
    text-align: center;
}

.filter-group {
    margin-bottom: 30px;
}

.filter-group h4 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
}

.filter-checkbox input[type="checkbox"] {
    margin-right: 10px;
    width: 16px;
    height: 16px;
    accent-color: #4FC3F7;
}

.salary-range {
    margin-top: 10px;
}

.salary-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    margin-bottom: 10px;
}

.salary-slider::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #4FC3F7;
    cursor: pointer;
}

.salary-values {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #999;
    margin-top: 10px;
}

/* Jobs Content */
.jobs-content {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.jobs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px;
    border-bottom: 1px solid #eee;
}

.results-info h2 {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.results-info p {
    color: #666;
    font-size: 14px;
}

.view-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.sort-dropdown select {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    cursor: pointer;
}

.view-controls {
    display: flex;
    gap: 5px;
}

.view-btn {
    padding: 10px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-btn:first-child {
    border-radius: 8px 0 0 8px;
}

.view-btn:last-child {
    border-radius: 0 8px 8px 0;
}

.view-btn.active {
    background: #4FC3F7;
    border-color: #4FC3F7;
    color: white;
}

/* Job Cards */
.jobs-grid {
    padding: 30px;
}

.job-card {
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    background: white;
}

.job-card:hover {
    border-color: #4FC3F7;
    box-shadow: 0 5px 15px rgba(79, 195, 247, 0.1);
}

/* Grid and List View Styles */
.jobs-grid.grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.jobs-grid.list-view .job-card {
    display: flex;
    align-items: center;
    gap: 20px;
}

.jobs-grid.list-view .job-card-header {
    flex: 1;
}

.jobs-grid.list-view .company-info {
    flex-direction: column;
    align-items: flex-start;
}

.jobs-grid.list-view .job-meta {
    margin-bottom: 0;
}

.job-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.company-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.company-logo {
    width: 50px;
    height: 50px;
    background: #f0f8ff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #4FC3F7;
    overflow: hidden;
}

.company-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.job-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.company-name {
    color: #666;
    font-size: 14px;
}

.save-job {
    background: none;
    border: none;
    font-size: 18px;
    color: #ddd;
    cursor: pointer;
    transition: color 0.3s ease;
}

.save-job:hover {
    color: #ff6b6b;
}

.job-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.job-location {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #666;
    font-size: 14px;
}

.job-type {
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.job-type.full-time {
    background: #e8f5e8;
    color: #2e7d32;
}

.job-type.remote {
    background: #e3f2fd;
    color: #1976d2;
}

.job-type.hybrid {
    background: #fff3e0;
    color: #f57c00;
}

.job-salary {
    color: #4FC3F7;
    font-weight: 600;
    font-size: 14px;
}

.job-description {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 14px;
}

.job-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.tag {
    background: #f1f3f4;
    color: #666;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.job-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.posted-date {
    color: #999;
    font-size: 12px;
}

.apply-btn {
    background: #4FC3F7;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.apply-btn:hover {
    background: #29B6F6;
    text-decoration: none;
    color: white;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 30px;
    border-top: 1px solid #eee;
}

.page-btn {
    padding: 10px 15px;
    border: 1px solid #ddd;
    background: white;
    color: #666;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.page-btn:hover:not(:disabled) {
    border-color: #4FC3F7;
    color: #4FC3F7;
}

.page-btn.active {
    background: #4FC3F7;
    border-color: #4FC3F7;
    color: white;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-numbers {
    display: flex;
    gap: 5px;
    align-items: center;
}

.page-dots {
    color: #999;
    padding: 0 10px;
}

/* Navigation Active State */
.nav-link.active {
    color: #4FC3F7;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .content-wrapper {
        grid-template-columns: 250px 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .search-section h1 {
        font-size: 32px;
    }
    
    .search-section .search-box {
        flex-direction: column;
        border-radius: 15px;
    }
    
    .search-section .location-input {
        border-left: none;
        border-top: 1px solid rgba(0, 0, 0, 0.1);
    }
    
    .search-section .search-btn {
        border-radius: 0 0 15px 15px;
    }
    
    .content-wrapper {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .filters-sidebar {
        position: static;
    }
    
    .jobs-header {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }
    
    .view-controls {
        width: 100%;
        justify-content: space-between;
    }
    
    .job-meta {
        gap: 10px;
    }
    
    .job-footer {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .pagination {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    /* Disable grid view on mobile */
    .jobs-grid.grid-view {
        display: block;
    }
    
    .jobs-grid.list-view .job-card {
        display: block;
    }
}

@media (max-width: 480px) {
    .jobs-grid,
    .jobs-header {
        padding: 20px;
    }
    
    .job-card {
        padding: 20px;
    }
    
    .company-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* Additional Styles for Enhanced Functionality */

/* Saved Job Button */
.save-job {
    background: none;
    border: none;
    font-size: 18px;
    color: #ccc;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 5px;
    border-radius: 50%;
}

.save-job:hover {
    background: rgba(79, 195, 247, 0.1);
    color: #4FC3F7;
}

.save-job.saved {
    color: #e74c3c !important;
}

.save-job.saved:hover {
    background: rgba(231, 76, 60, 0.1);
}

/* No Jobs Found */
.no-jobs {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-jobs i {
    font-size: 48px;
    color: #ccc;
    margin-bottom: 20px;
}

.no-jobs h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #333;
}

.no-jobs p {
    font-size: 16px;
}

/* Grid View */
.jobs-grid.grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.jobs-grid.grid-view .job-card {
    margin-bottom: 0;
}

/* Enhanced Job Type Badges */
.job-type {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
}

.job-type.full-time {
    background: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
}

.job-type.part-time {
    background: rgba(255, 152, 0, 0.1);
    color: #FF9800;
}

.job-type.contract {
    background: rgba(156, 39, 176, 0.1);
    color: #9C27B0;
}

.job-type.remote {
    background: rgba(33, 150, 243, 0.1);
    color: #2196F3;
}

.job-type.hybrid {
    background: rgba(0, 188, 212, 0.1);
    color: #00BCD4;
}

/* Enhanced Apply Button */
.apply-btn {
    background: linear-gradient(135deg, #4FC3F7 0%, #29B6F6 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(79, 195, 247, 0.3);
    text-decoration: none;
    display: inline-block;
}

.apply-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 195, 247, 0.4);
    text-decoration: none;
    color: white;
}

/* Enhanced Tags */
.job-tags {
    margin: 15px 0;
}

.tag {
    display: inline-block;
    background: rgba(79, 195, 247, 0.1);
    color: #4FC3F7;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
    margin-right: 8px;
    margin-bottom: 8px;
    border: 1px solid rgba(79, 195, 247, 0.2);
    transition: all 0.3s ease;
}

.tag:hover {
    background: #4FC3F7;
    color: white;
    transform: translateY(-1px);
}

/* Loading Animation */
.job-card.loading {
    opacity: 0.6;
    pointer-events: none;
}

.job-card.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #4FC3F7;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Active Filters Display */
.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(79, 195, 247, 0.05);
    border-radius: 12px;
    border-left: 4px solid #4FC3F7;
}

.filter-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    border: 1px solid #4FC3F7;
    border-radius: 20px;
    padding: 8px 15px;
    font-size: 14px;
    color: #333;
    box-shadow: 0 2px 8px rgba(79, 195, 247, 0.2);
    transition: all 0.3s ease;
}

.filter-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(79, 195, 247, 0.3);
}

.filter-badge i {
    color: #4FC3F7;
    font-size: 12px;
}

.filter-badge .remove-filter {
    background: rgba(244, 67, 54, 0.1);
    color: #f44336;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    margin-left: 5px;
    transition: all 0.3s ease;
}

.filter-badge .remove-filter:hover {
    background: #f44336;
    color: white;
    transform: scale(1.1);
}