:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --light-gray: #f4f6f9;
    --border-color: #e1e5ea;
    --white: #ffffff;
}

html {
    box-sizing: border-box;
}

*, *::before, *::after {
    box-sizing: inherit;
}

body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    color: var(--primary-color);
    background-color: var(--light-gray);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 1.6rem;
    cursor: pointer;
}

.menu-toggle:focus {
    outline: 2px solid var(--secondary-color);
    border-radius: 4px;
}

.nav-menu {
    display: flex;
    align-items: center;
}

.logo {
    font-size: 1.8em;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.logo i {
    color: var(--secondary-color);
}

.nav-menu a {
    color: var(--primary-color);
    text-decoration: none;
    margin: 0 15px;
    font-weight: 600;
    transition: color 0.3s;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--secondary-color);
}

.main-content {
    padding: 40px 0;
}

.main-content .container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
}

.filters-sidebar {
    background: var(--white);
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    height: fit-content;
}

.filter-group {
    margin-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 25px;
}

.filter-group:last-child {
    border-bottom: none;
}

.filter-group h4 {
    margin-top: 0;
}

.filter-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 400;
}

.filter-group select,
.filter-group input[type="text"] {
    width: 100%;
    padding: 8px;
    border-radius: 5px;
    border: 1px solid var(--border-color);
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.salary-range {
    text-align: center;
    font-weight: 600;
}

input[type="range"] {
    width: 100%;
}

.job-listings {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.job-card {
    background: var(--white);
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border-left: 5px solid var(--secondary-color);
    transition: transform 0.3s, box-shadow 0.3s;
}

.job-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.job-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.job-title {
    font-size: 1.5em;
    font-weight: 600;
    margin: 0;
}

.company-name {
    font-size: 1.1em;
    color: var(--secondary-color);
    font-weight: 600;
    margin: 5px 0 15px 0;
}

.job-meta {
    display: flex;
    gap: 20px;
    color: #555;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.job-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.job-description {
    font-size: 0.95em;
    color: #666;
}

.job-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.post-date {
    font-style: italic;
    color: #888;
}

.apply-button {
    background: var(--secondary-color);
    color: var(--white);
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
}

.apply-button:hover {
    background: #2980b9;
}

/* Loading Spinner Styles */
.loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px;
    width: 100%;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* UI Improvements */
.job-description-full {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
    margin: 15px 0;
    white-space: pre-line;
    /* Preserves line breaks from your JSON */
}

.filter-label {
    display: block;
    margin-bottom: 8px;
    cursor: pointer;
    font-size: 0.9rem;
}

.no-results {
    text-align: center;
    padding: 40px;
    color: #777;
    grid-column: 1 / -1;
}
@media (max-width: 900px) {
    .header .container {
        position: relative;
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 15px;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        border-radius: 12px;
        box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
        flex-direction: column;
        align-items: flex-start;
        padding: 0 20px;
        width: auto;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
        z-index: 999;
    }

    .nav-menu.open {
        max-height: 320px;
        opacity: 1;
        padding: 20px;
    }

    .nav-menu a {
        display: block;
        width: 100%;
        margin: 12px 0;
    }

    .menu-toggle {
        display: block;
    }

    .main-content .container {
        grid-template-columns: 1fr;
    }

    .filters-sidebar {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .header .container {
        padding: 0 15px;
    }

    .nav-menu {
        left: 0;
        right: 0;
    }
}
