/* =================================================================
   RESPONSIVE JOB CARDS - Desktop & Mobile Layouts
   ================================================================= */

/* Base job card styles */
.jobs-cards-container .job-card,
.jobs-cards-container .searchable-job-card {
    background: #ffffff;
    border: 1px solid #e1e1e1;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-bottom: 15px;
    width: 100%;
    box-sizing: border-box;
    transition: all 0.3s ease;
    display: flex;
}

.jobs-cards-container .job-card:hover,
.jobs-cards-container .searchable-job-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: #007cba;
}

/* DESKTOP LAYOUT: Horizontal (job title | location | type | apply) */
@media (min-width: 769px) {
    .jobs-cards-container .job-card,
    .jobs-cards-container .searchable-job-card {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    
    .jobs-cards-container .job-card-content {
        display: flex;
        align-items: center;
        gap: 30px;
        flex: 1;
    }
    
    .jobs-cards-container .job-card-title {
        margin: 0;
        font-size: 1.2em;
        font-weight: 600;
        color: #333;
        min-width: 200px;
        flex-shrink: 0;
    }
    
    .jobs-cards-container .job-card-details {
        display: flex;
        align-items: center;
        gap: 20px;
        flex: 1;
    }
    
    .jobs-cards-container .job-card-location,
    .jobs-cards-container .job-card-type {
        font-size: 0.95em;
        color: #666;
        white-space: nowrap;
    }
    
    .jobs-cards-container .job-card-actions {
        margin-left: 20px;
    }
    
    .jobs-cards-container .job-apply-btn {
        background: #007cba;
        color: #fff;
        padding: 10px 20px;
        border-radius: 6px;
        text-decoration: none;
        font-weight: 500;
        transition: all 0.3s ease;
        white-space: nowrap;
    }
    
    .jobs-cards-container .job-apply-btn:hover {
        background: #005a8b;
        transform: translateY(-1px);
    }
}

/* MOBILE LAYOUT: Vertical (Job title \n location \n type \n apply) */
@media (max-width: 768px) {
    .jobs-cards-container .job-card,
    .jobs-cards-container .searchable-job-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
    }
    
    .jobs-cards-container .job-card-content {
        width: 100%;
        margin-bottom: 15px;
    }
    
    .jobs-cards-container .job-card-title {
        margin: 0 0 12px 0;
        font-size: 1.3em;
        font-weight: 600;
        color: #333;
        line-height: 1.4;
        width: 100%;
    }
    
    .jobs-cards-container .job-card-details {
        width: 100%;
        margin-bottom: 15px;
    }
    
    .jobs-cards-container .job-card-location {
        display: block;
        font-size: 1em;
        color: #666;
        margin-bottom: 8px;
        padding: 5px 0;
    }
    
    .jobs-cards-container .job-card-type {
        display: block;
        font-size: 1em;
        color: #666;
        margin-bottom: 0;
        padding: 5px 0;
    }
    
    .jobs-cards-container .job-card-actions {
        width: 100%;
        margin-top: 10px;
    }
    
    .jobs-cards-container .job-apply-btn {
        background: #007cba;
        color: #fff;
        padding: 12px 24px;
        border-radius: 6px;
        text-decoration: none;
        font-weight: 500;
        font-size: 1em;
        transition: all 0.3s ease;
        display: block;
        text-align: center;
        width: 100%;
        box-sizing: border-box;
    }
    
    .jobs-cards-container .job-apply-btn:hover {
        background: #005a8b;
    }
}

/* =================================================================
   ENHANCED SEARCH FORM STYLING - Jobs Page
   ================================================================= */

.advanced-search-jobs { 
    margin: 30px 0; 
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Main search form card */
.jobs-search-form { 
    background: #ffffff; 
    padding: 35px; 
    border-radius: 16px; 
    margin-bottom: 40px; 
    border: 1px solid #e1e5e9; 
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.jobs-search-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #007cba 0%, #0096d4 50%, #007cba 100%);
}

.jobs-search-form:hover {
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

/* Search form title */
.jobs-search-form h3 {
    color: #2c3e50;
    font-size: 1.6em;
    font-weight: 700;
    margin: 0 0 25px 0;
    text-align: center;
    letter-spacing: -0.5px;
}

/* Search inputs row */
.search-inputs-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

/* Individual search fields */
.search-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.search-field label {
    font-weight: 600;
    color: #495057;
    font-size: 0.95em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.search-input {
    padding: 14px 18px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1em;
    transition: all 0.3s ease;
    background: #f8f9fa;
    box-sizing: border-box;
    width: 100%;
}

.search-input:focus {
    outline: none;
    border-color: #007cba;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(0,124,186,0.1);
    transform: translateY(-1px);
}

.search-input::placeholder {
    color: #adb5bd;
    font-style: italic;
}

/* Job type section */
.job-type-section {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.section-label {
    font-weight: 600;
    color: #495057;
    font-size: 0.95em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
    display: block;
}

.radio-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background: #ffffff;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9em;
    font-weight: 500;
    color: #495057;
}

.radio-option:hover {
    border-color: #007cba;
    background: #f0f8ff;
    transform: translateY(-1px);
}

.radio-option input[type="radio"] {
    margin: 0;
    accent-color: #007cba;
}

.radio-option:has(input:checked) {
    border-color: #007cba;
    background: #e3f2fd;
    color: #007cba;
    font-weight: 600;
}

/* Search button section */
.search-button-section {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

.jobs-search-btn {
    background: linear-gradient(135deg, #007cba 0%, #0096d4 100%);
    color: #ffffff;
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,124,186,0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.jobs-search-btn:hover {
    background: linear-gradient(135deg, #005a8b 0%, #007cba 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,124,186,0.4);
}

.jobs-clear-btn {
    background: #6c757d;
    color: #ffffff;
    padding: 15px 25px;
    border: none;
    border-radius: 10px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.jobs-clear-btn:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .jobs-search-form {
        padding: 25px 20px;
        margin: 20px 10px 30px 10px;
    }
    
    .jobs-search-form h3 {
        font-size: 1.4em;
    }
    
    .search-inputs-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .radio-group {
        grid-template-columns: 1fr;
    }
    
    .search-button-section {
        flex-direction: column;
        gap: 10px;
    }
    
    .jobs-search-btn, .jobs-clear-btn {
        width: 100%;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .advanced-search-jobs {
        margin: 15px 0;
    }
    
    .jobs-search-form {
        padding: 20px 15px;
        margin: 10px 5px 25px 5px;
    }
}

/* No jobs message */
.no-jobs-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    color: #666;
    font-style: italic;
}

/* =================================================================
   JOB META CARD STYLING - Single Job Page
   ================================================================= */

/* Job meta card container */
.job-meta-card {
    background: #ffffff;
    border: 1px solid #e1e1e1;
    border-radius: 12px;
    padding: 25px;
    margin: 20px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.job-meta-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

/* Job meta list styling */
.job-meta-card .job-listing-meta {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 15px;
}

/* Desktop: 2 columns */
@media (min-width: 769px) {
    .job-meta-card .job-listing-meta {
        grid-template-columns: 1fr 1fr;
    }
}

/* Mobile: 1 column */
@media (max-width: 768px) {
    .job-meta-card .job-listing-meta {
        grid-template-columns: 1fr;
    }
    
    .job-meta-card {
        padding: 20px;
    }
}

/* Individual meta items */
.job-meta-card .job-listing-meta li {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 12px 15px;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: all 0.2s ease;
}

.job-meta-card .job-listing-meta li:hover {
    background: #e9ecef;
    border-color: #007cba;
}

/* Meta labels */
.job-meta-card .meta-label {
    font-weight: 600;
    font-size: 0.85em;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Meta values */
.job-meta-card .meta-value {
    font-size: 1em;
    color: #333;
    font-weight: 500;
}

/* Special styling for job type */
.job-meta-card .job-type {
    border-left: 4px solid #007cba;
}

/* Special styling for location */
.job-meta-card .location {
    border-left: 4px solid #28a745;
}

/* Special styling for date posted */
.job-meta-card .date-posted {
    border-left: 4px solid #ffc107;
}

/* Special styling for salary */
.job-meta-card .salary {
    border-left: 4px solid #dc3545;
}

/* Status messages styling */
.job-meta-card .position-filled,
.job-meta-card .listing-expired {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    font-weight: 600;
    text-align: center;
    grid-column: 1 / -1; /* Span full width */
}

/* =================================================================
   LOAD MORE BUTTON STYLING
   ================================================================= */

.load-more-section {
    margin-top: 40px;
    padding: 20px;
    text-align: center;
}

.load-more-btn {
    background: linear-gradient(135deg, #007cba 0%, #0096d4 100%);
    color: #ffffff;
    padding: 15px 40px;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,124,186,0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 200px;
    position: relative;
}

.load-more-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #005a8b 0%, #007cba 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,124,186,0.4);
}

.load-more-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.load-more-spinner {
    display: none;
    animation: spin 1s linear infinite;
}

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

/* Results header styling */
.results-header {
    margin-bottom: 20px;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #007cba;
    font-weight: 600;
    color: #495057;
}

/* Mobile responsive for load more */
@media (max-width: 768px) {
    .load-more-btn {
        width: 100%;
        padding: 15px 20px;
        font-size: 1em;
    }
    
    .load-more-section {
        margin-top: 30px;
        padding: 15px;
    }
}

/* =================================================================
   PAGINATION STYLING
   ================================================================= */

.pagination-section {
    margin-top: 40px;
    padding: 20px;
    text-align: center;
    border-top: 1px solid #e1e1e1;
    background: #f8f9fa;
    border-radius: 8px;
}

.pagination-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.pagination-btn {
    background: #ffffff;
    color: #007cba;
    border: 2px solid #007cba;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.pagination-btn:hover:not(:disabled) {
    background: #007cba;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,124,186,0.3);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

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

.page-number-btn {
    background: #ffffff;
    color: #333;
    border: 1px solid #ddd;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.95em;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 40px;
    text-align: center;
}

.page-number-btn:hover {
    background: #f0f8ff;
    border-color: #007cba;
    color: #007cba;
}

.page-number-btn.active {
    background: #007cba;
    color: #ffffff;
    border-color: #007cba;
    font-weight: 600;
}

.page-dots {
    color: #666;
    font-weight: 600;
    padding: 0 5px;
}

/* Results header with page info */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #007cba;
    font-weight: 600;
    color: #495057;
    flex-wrap: wrap;
    gap: 10px;
}

.page-info {
    font-size: 0.9em;
    color: #666;
    font-weight: 500;
}

/* Loading state for pagination */
.loading-jobs {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 1.1em;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e1e1e1;
}

/* Mobile responsive for pagination */
@media (max-width: 768px) {
    .pagination-controls {
        flex-direction: column;
        gap: 15px;
    }
    
    .page-numbers {
        margin: 0;
        order: -1;
    }
    
    .pagination-btn {
        padding: 12px 24px;
        font-size: 1em;
        min-width: 120px;
    }
    
    .results-header {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    
    .page-info {
        font-size: 0.85em;
    }
}

@media (max-width: 480px) {
    .pagination-section {
        padding: 15px 10px;
        margin-top: 30px;
    }
    
    .page-numbers {
        gap: 3px;
    }
    
    .page-number-btn {
        padding: 6px 10px;
        font-size: 0.9em;
        min-width: 35px;
    }
    
    .pagination-btn {
        padding: 10px 20px;
        font-size: 0.95em;
        min-width: 100px;
    }
}
