
/* ===== CSS Variables ===== */
:root {
    --primary-color: #1967d2;
    --primary-hover: #1557b0;
    --secondary-color: #34a853;
    --text-primary: #202124;
    --text-secondary: #5f6368;
    --text-light: #80868b;
    --border-color: #e8eaed;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.12);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --transition: all 0.3s ease;
}

/* ===== Base Styles ===== */
.job-list-page {
    background-color: rgb(244, 244, 244);
    min-height: 100vh;
    padding-bottom: 60px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== Page Header ===== */
.page-header {
    background: black;
    color: white;
    padding: 60px 0;
    margin-bottom: 40px;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    text-align: center;
}

.page-subtitle {
    font-size: 1.125rem;
    margin: 0;
    text-align: center;
    opacity: 0.9;
}

/* ===== Main Layout ===== */
.job-list-wrapper {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    align-items: start;
}

/* ===== Filters Sidebar ===== */
.filters-sidebar {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 25px;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 20px;
}

.filter-section {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
}

.filter-section:last-of-type {
    border-bottom: none;
    margin-bottom: 20px;
}

.filter-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 15px 0;
}

/* Search Box */
.search-box {
    position: relative;
    display: flex;
    gap: 8px;
}

.search-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(25, 103, 210, 0.1);
}

.search-btn {
    padding: 12px 16px;
    background-color: black;
    border: none;
    border-radius: var(--radius-md);
    color: white;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn svg {
    width: 18px;
    height: 18px;
}

.search-btn:hover {
    background: var(--primary-hover);
}

/* Location Input */
.location-input {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.location-input:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(25, 103, 210, 0.1);
}

.location-input svg {
    width: 18px;
    height: 18px;
    color: var(--text-light);
    flex-shrink: 0;
}

.location-field {
    flex: 1;
    border: none;
    outline: none;
    font-size: 0.9375rem;
    color: var(--text-primary);
}

/* Select Dropdown */
.filter-select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    color: var(--text-primary);
    background: white;
    cursor: pointer;
    transition: var(--transition);
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(25, 103, 210, 0.1);
}

/* Checkbox Group */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.checkbox-label:hover {
    background: var(--bg-light);
}

.checkbox-input {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.checkbox-text {
    flex: 1;
    font-size: 0.9375rem;
    color: var(--text-primary);
}

.checkbox-count {
    font-size: 0.875rem;
    color: var(--text-light);
}

/* Radio Group */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.radio-label:hover {
    background: var(--bg-light);
}

.radio-input {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.radio-text {
    font-size: 0.9375rem;
    color: var(--text-primary);
}

/* Salary Range */
.salary-range {
    padding: 10px 0;
}

.salary-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: var(--border-color);
    outline: none;
    /* -webkit-appearance: none; */
    margin-bottom: 15px;
}

.salary-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.salary-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.salary-values {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

#salaryValue {
    font-weight: 600;
    color: var(--primary-color);
}

/* Reset Filters Button */
.btn-reset-filters {
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-reset-filters:hover {
    background: var(--bg-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* ===== Job Listings Main Content ===== */
.job-listings-main {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Listings Header */
.listings-header {
    background: var(--bg-white);
    padding: 20px 25px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.results-info {
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.results-count {
    font-weight: 600;
    color: var(--text-primary);
}

.listings-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.view-toggle {
    display: flex;
    gap: 5px;
    background: var(--bg-light);
    padding: 4px;
    border-radius: var(--radius-md);
}

.view-btn {
    padding: 8px 12px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.view-btn svg {
    width: 18px;
    height: 18px;
    color: var(--text-light);
}

.view-btn.active {
    background: white;
    box-shadow: var(--shadow-sm);
}

.view-btn.active svg {
    color: var(--primary-color);
}

.sort-dropdown {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sort-label {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.sort-select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    color: var(--text-primary);
    background: white;
    cursor: pointer;
    transition: var(--transition);
}

.sort-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* ===== Job Listing Cards ===== */
.job-listings-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.job-listing-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 25px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 2rem 0;
}

.job-listing-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* Card Header */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.company-logo {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
    flex-shrink: 0;
}

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

.card-actions {
    display: flex;
    gap: 10px;
}

.btn-bookmark {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-bookmark svg {
    width: 20px;
    height: 20px;
    color: var(--text-light);
    transition: var(--transition);
}

.btn-bookmark:hover {
    border-color: var(--primary-color);
    background: rgba(25, 103, 210, 0.05);
}

.btn-bookmark:hover svg {
    color: var(--primary-color);
}

.btn-bookmark.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-bookmark.active svg {
    color: white;
    fill: white;
}

/* Card Body */
.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.job-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.6rem;
    /* font-weight: 600; */
    /* text-transform: uppercase; */
    letter-spacing: 0.5px;
}

.badge-featured {
    background: rgba(255, 191, 0, 0.7);
    color: #ffffff;
}

.badge-urgent {
    background: rgb(255, 17, 0.7);
    color: #ffffff;
}

.job-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.job-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
}

.job-title a:hover {
    color: var(--primary-color);
}

.job-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.meta-item svg {
    width: 16px;
    height: 16px;
    color: var(--text-light);
    flex-shrink: 0;
}

.job-description {
    margin: 0;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

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

.tag {
    padding: 6px 14px;
    background: var(--bg-light);
    border-radius: 20px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.tag:hover {
    background: rgba(25, 103, 210, 0.1);
    color: var(--primary-color);
}

/* Card Footer */
.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.salary-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--secondary-color);
}

.salary-info svg {
    width: 20px;
    height: 20px;
}

.btn-apply {
    padding: 12px 28px;
    background: black;
    color: white;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn-apply-filters {
    padding: 8px 28px;
    background: black;
    color: white;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    display: none;
}

.btn-apply:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(25, 103, 210, 0.3);
}

/* ===== Pagination ===== */
.pagination-wrapper {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-white);
    padding: 15px 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.pagination-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: transparent;
    border: 1px solid black;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.pagination-btn svg {
    width: 16px;
    height: 16px;
}

.pagination-btn:hover:not(:disabled) {
    background: black;
    border-color: black;
    color: white;
}

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

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

.pagination-number {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.pagination-number:hover {
    background: var(--bg-light);
    border-color: var(--border-color);
}

.pagination-number.active {
    background: black;
    color: white;
    border-color: black;
}

.pagination-dots {
    padding: 0 8px;
    color: var(--text-light);
    font-size: 0.9375rem;
}

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

/* Tablet */
@media (max-width: 1024px) {
    .job-list-wrapper {
        grid-template-columns: 1fr;
    }

    .filters-sidebar {
        display: none;
        position: static;
    }

    .page-title {
        font-size: 2rem;
    }

    .job-title {
        font-size: 1.25rem;
    }

    .btn-apply-filters {
        display: inline-block;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .page-header {
        padding: 40px 0;
    }

    .page-title {
        font-size: 1.75rem;
    }

    .page-subtitle {
        font-size: 1rem;
    }

    .listings-header {
        flex-direction: column;
        align-items: stretch;
    }

    .listings-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .sort-dropdown {
        flex-direction: column;
                align-items: stretch;
    }

    .sort-label {
        font-size: 0.875rem;
    }

    .sort-select {
        width: 100%;
    }

    .view-toggle {
        justify-content: center;
    }

    .job-listing-card {
        padding: 20px;
    }

    .card-header {
        flex-direction: column;
        gap: 15px;
    }

    .company-logo {
        width: 60px;
        height: 60px;
    }

    .card-actions {
        align-self: flex-end;
    }

    .job-title {
        font-size: 1.125rem;
    }

    .job-meta {
        flex-direction: column;
        gap: 10px;
    }

    .card-footer {
        /* flex-direction: column; */
        gap: 15px;
        align-items: stretch;
    }

    .btn-apply {
        width: 80%;
        text-align: center;
    }

    .btn-apply-filters {
        display: inline-block;
    }

    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }

    .pagination-btn {
        font-size: 0.875rem;
        padding: 8px 12px;
    }

    .pagination-number {
        min-width: 36px;
        height: 36px;
        font-size: 0.875rem;
    }

    /* Hide some pagination numbers on mobile */
    .pagination-number:nth-child(n+4):nth-last-child(n+3) {
        display: none;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

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

    .page-subtitle {
        font-size: 0.9375rem;
    }

    .filters-sidebar {
        padding: 20px;
    }

    .job-listing-card {
        padding: 15px;
    }

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

    .job-description {
        font-size: 0.875rem;
    }

    .salary-info {
        font-size: 0.9375rem;
    }

    .btn-apply {
        padding: 10px 20px;
        font-size: 0.875rem;
    }
}

/* ===== Loading States ===== */
.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    color: var(--text-light);
}

.empty-state-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 10px 0;
}

.empty-state-text {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0 0 25px 0;
}

.btn-reset {
    padding: 12px 28px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-reset:hover {
    background: var(--primary-hover);
}

/* ===== Animations ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.job-listing-card {
    animation: fadeIn 0.5s ease-out;
}

.job-listing-card:nth-child(1) { animation-delay: 0.1s; }
.job-listing-card:nth-child(2) { animation-delay: 0.2s; }
.job-listing-card:nth-child(3) { animation-delay: 0.3s; }
.job-listing-card:nth-child(4) { animation-delay: 0.4s; }
.job-listing-card:nth-child(5) { animation-delay: 0.5s; }

/* ===== Accessibility ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus styles for keyboard navigation */
.search-input:focus,
.location-field:focus,
.filter-select:focus,
.sort-select:focus,
.btn-apply:focus,
.btn-bookmark:focus,
.pagination-btn:focus,
.pagination-number:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ===== Print Styles ===== */
@media print {
    .filters-sidebar,
    .listings-header,
    .pagination-wrapper,
    .btn-bookmark,
    .btn-apply {
        display: none;
    }

    .job-list-wrapper {
        grid-template-columns: 1fr;
    }

    .job-listing-card {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid var(--border-color);
    }
}