/* Enhanced Job Listings Styles */

/* ====== MAIN JOB LISTINGS SECTION ====== */
.enhanced-job-listings {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    position: relative;
    overflow: hidden;
}

.enhanced-job-listings::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, rgba(247, 115, 41, 0.05) 0%, rgba(247, 115, 41, 0.02) 100%);
    z-index: 1;
}

.enhanced-job-listings .container {
    position: relative;
    z-index: 2;
}

/* ====== SECTION HEADER ====== */
.enhanced-job-listings .section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.enhanced-job-listings .section-header h2 {
    background: linear-gradient(135deg, #2c3e50 0%, #f77329 50%, #2c3e50 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 4s ease-in-out infinite;
    margin-bottom: 1rem;
}

.enhanced-job-listings .section-description {
    font-size: 1.1rem;
    color: #6c757d;
    max-width: 600px;
    margin: 0 auto;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ====== SEARCH AND FILTERS SECTION ====== */
.job-search-filters {
    background: white;
    border-radius: 25px;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(247, 115, 41, 0.1);
    position: relative;
    overflow: hidden;
}

.job-search-filters::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(135deg, #f77329 0%, #e55a1f 100%);
}

.search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: end;
}

.search-field {
    flex: 1;
    min-width: 250px;
}

.search-field label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    display: block;
    font-size: 0.9rem;
}

.search-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.search-input:focus {
    border-color: #f77329;
    box-shadow: 0 0 0 3px rgba(247, 115, 41, 0.1);
    outline: none;
}

.search-select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-select:focus {
    border-color: #f77329;
    box-shadow: 0 0 0 3px rgba(247, 115, 41, 0.1);
    outline: none;
}

.search-btn {
    background: linear-gradient(135deg, #f77329 0%, #e55a1f 100%);
    border: none;
    color: white;
    padding: 0.875rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(247, 115, 41, 0.3);
}

.clear-filters-btn {
    background: transparent;
    border: 2px solid #6c757d;
    color: #6c757d;
    padding: 0.875rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.clear-filters-btn:hover {
    background: #6c757d;
    color: white;
}

/* ====== JOBS HEADER SECTION ====== */
.jobs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.jobs-count {
    color: #6c757d;
    font-size: 1.1rem;
}

.jobs-count strong {
    color: #f77329;
    font-weight: 600;
}

.sort-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sort-label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
}

.sort-select {
    padding: 0.5rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    min-width: 150px;
}

.view-toggle {
    display: flex;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 0.25rem;
}

.view-btn {
    background: transparent;
    border: none;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #6c757d;
}

.view-btn.active {
    background: white;
    color: #f77329;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ====== ENHANCED JOB CARDS ====== */
.jobs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
    align-items: stretch;
}

.enhanced-job-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(247, 115, 41, 0.1);
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 420px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.06),
        0 1px 3px rgba(0, 0, 0, 0.08);
}

.enhanced-job-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(135deg, #f77329 0%, #e55a1f 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.enhanced-job-card:hover::before {
    transform: scaleX(1);
}

.enhanced-job-card:hover {
    transform: translateY(-8px);
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.12),
        0 4px 15px rgba(247, 115, 41, 0.1);
    border-color: rgba(247, 115, 41, 0.2);
}

/* Job Card Header */
.job-card-header {
    display: flex;
    justify-content: between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.job-company-logo {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f77329 0%, #e55a1f 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.job-header-content {
    flex: 1;
}

.job-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    font-family: "Playfair Display", serif;
}

.job-company {
    color: #f77329;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.job-location {
    color: #6c757d;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.job-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.job-badge {
    padding: 0.375rem 0.875rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 2px solid;
}

.job-badge.featured {
    background: rgba(255, 193, 7, 0.1);
    color: #f57c00;
    border-color: rgba(255, 193, 7, 0.3);
}

.job-badge.urgent {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border-color: rgba(220, 53, 69, 0.3);
}

.job-badge.remote {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border-color: rgba(40, 167, 69, 0.3);
}

.job-badge.new {
    background: rgba(247, 115, 41, 0.1);
    color: #f77329;
    border-color: rgba(247, 115, 41, 0.3);
}

/* Job Description */
.job-description {
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    flex-grow: 1;
}

/* Job Meta Information */
.job-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(247, 115, 41, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(247, 115, 41, 0.1);
}

.job-meta-item {
    text-align: center;
}

.job-meta-label {
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.job-meta-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: #2c3e50;
}

/* Job Actions */
.job-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: auto;
    padding-top: 1rem;
}

.job-apply-btn {
    background: linear-gradient(135deg, #f77329 0%, #e55a1f 100%);
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    max-width: 200px;
    text-decoration: none;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.job-apply-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(247, 115, 41, 0.3);
    color: white;
    text-decoration: none;
}

.job-secondary-actions {
    display: flex;
    gap: 0.75rem;
}

.job-action-btn {
    background: transparent;
    border: 2px solid #e9ecef;
    color: #6c757d;
    padding: 0.75rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
}

.job-action-btn:hover {
    border-color: #f77329;
    color: #f77329;
    background: rgba(247, 115, 41, 0.05);
}

.job-action-btn.active {
    border-color: #f77329;
    color: #f77329;
    background: rgba(247, 115, 41, 0.1);
}

/* ====== PAGINATION SECTION ====== */
.enhanced-pagination {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.06),
        0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(247, 115, 41, 0.1);
}

.pagination-info {
    margin-bottom: 1.5rem;
    color: #6c757d;
    font-size: 0.95rem;
}

.pagination-info strong {
    color: #f77329;
}

.pagination {
    justify-content: center;
    margin-bottom: 0;
}

.pagination .page-item .page-link {
    border: 2px solid #e9ecef;
    color: #6c757d;
    padding: 0.75rem 1rem;
    margin: 0 0.25rem;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    background: white;
}

.pagination .page-item .page-link:hover {
    background: rgba(247, 115, 41, 0.05);
    border-color: #f77329;
    color: #f77329;
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #f77329 0%, #e55a1f 100%);
    border-color: #f77329;
    color: white;
    box-shadow: 0 4px 15px rgba(247, 115, 41, 0.3);
}

.pagination .page-item.disabled .page-link {
    background: #f8f9fa;
    border-color: #e9ecef;
    color: #6c757d;
    opacity: 0.5;
}

/* ====== NO JOBS STATE ====== */
.no-jobs-state {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 20px;
    border: 2px dashed rgba(247, 115, 41, 0.2);
}

.no-jobs-icon {
    font-size: 4rem;
    color: rgba(247, 115, 41, 0.3);
    margin-bottom: 1.5rem;
}

.no-jobs-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1rem;
    font-family: "Playfair Display", serif;
}

.no-jobs-description {
    color: #6c757d;
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.no-jobs-action {
    background: linear-gradient(135deg, #f77329 0%, #e55a1f 100%);
    border: none;
    color: white;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.no-jobs-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(247, 115, 41, 0.3);
    color: white;
    text-decoration: none;
}

/* ====== LOADING STATES ====== */
.jobs-loading {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.job-card-skeleton {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(247, 115, 41, 0.1);
    animation: skeletonPulse 1.5s ease-in-out infinite;
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s infinite;
    border-radius: 8px;
}

.skeleton-title {
    height: 24px;
    width: 70%;
    margin-bottom: 1rem;
}

.skeleton-subtitle {
    height: 16px;
    width: 50%;
    margin-bottom: 0.5rem;
}

.skeleton-text {
    height: 14px;
    width: 100%;
    margin-bottom: 0.5rem;
}

.skeleton-text:last-child {
    width: 80%;
}

.skeleton-meta {
    display: flex;
    gap: 1rem;
    margin: 1.5rem 0;
}

.skeleton-meta-item {
    height: 60px;
    flex: 1;
    border-radius: 12px;
}

.skeleton-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.skeleton-btn {
    height: 44px;
    width: 120px;
    border-radius: 25px;
}

.skeleton-icon {
    height: 44px;
    width: 44px;
    border-radius: 12px;
}

@keyframes skeletonShimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes skeletonPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* ====== RESPONSIVE DESIGN ====== */
@media (max-width: 1024px) and (min-width: 769px) {
    .jobs-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .search-form {
        flex-direction: column;
    }
    
    .search-field {
        min-width: 100%;
    }
    
    .jobs-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        gap: 1rem;
    }
    
    .sort-controls {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .jobs-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .enhanced-job-card {
        padding: 1.5rem;
        min-height: auto;
    }
    
    .job-card-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .job-company-logo {
        align-self: center;
    }
    
    .job-meta {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .job-actions {
        flex-direction: column;
        gap: 1rem;
    }
    
    .job-apply-btn {
        max-width: 100%;
    }
    
    .enhanced-pagination {
        padding: 1.5rem;
    }
    
    .job-search-filters {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }
}

@media (max-width: 480px) {
    .job-search-filters {
        padding: 1.5rem;
        border-radius: 15px;
    }
    
    .enhanced-job-card {
        padding: 1.25rem;
        border-radius: 15px;
    }
    
    .job-meta {
        grid-template-columns: 1fr;
    }
    
    .job-secondary-actions {
        justify-content: center;
    }
    
    .no-jobs-state {
        padding: 3rem 1.5rem;
    }
}

/* ====== ACCESSIBILITY ====== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for accessibility */
.enhanced-job-card:focus,
.job-apply-btn:focus,
.job-action-btn:focus,
.search-input:focus,
.search-select:focus {
    outline: 3px solid rgba(247, 115, 41, 0.5);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .enhanced-job-card {
        border: 2px solid #000;
    }
    
    .job-badge {
        border-width: 2px;
    }
}
