:root {
    --primary: #2563eb;
    --dark: #1e293b;
    --light: #f8fafc;
}

html {
    height: 100%;
}

body { 
    font-family: 'Inter', -apple-system, sans-serif; 
    background-color: var(--light); 
    margin: 0; 
    color: var(--dark);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

header { 
    background: white; 
    padding: 1rem 1rem; 
    text-align: center; 
    border-bottom: 1px solid #e2e8f0;
    position: relative;
}

.header-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    font-size: 2rem;
    width: 50px;
    height: 50px;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-toggle .material-icons-outlined {
    display: flex;
    align-items: center;
    font-size: 2rem;
}

h1 { 
    margin: 0; 
    font-size: 1.8rem; 
    letter-spacing: -0.025em; 
}

h1 span { 
    color: var(--primary); 
}

header > p {
    margin: 0.5rem 0 0 0;
    font-size: 0.95rem;
    color: #64748b;
}

.mobile-nav {
    display: none !important;
    position: fixed;
    top: 100px;
    right: 0;
    left: auto;
    background: white;
    flex-direction: column;
    border-bottom: 1px solid #e2e8f0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    z-index: 1000;
    box-shadow: -4px 4px 6px rgba(0, 0, 0, 0.1);
    width: 250px;
    min-width: 250px;
}

.mobile-nav.active {
    max-height: 400px;
    display: flex !important;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    text-decoration: none;
    color: var(--dark);
    border-bottom: 1px solid #e2e8f0;
    transition: background-color 0.2s ease;
    font-weight: 500;
    width: 100%;
    box-sizing: border-box;
}

.nav-link:last-child {
    border-bottom: none;
}

.nav-link:hover {
    background-color: #f1f5f9;
    color: var(--primary);
}

.nav-link .material-icons-outlined {
    color: var(--primary);
    font-size: 1.25rem;
}

/* Layout for sidebar and content */
.main-layout {
    display: flex;
    max-width: 1200px;
    margin: 2rem auto;
    width: 100%;
    box-sizing: border-box;
    gap: 2rem;
    min-height: 60vh;
    padding: 0 1rem;
}

.sidebar {
    width: 240px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(37,99,235,0.07);
    padding: 2rem 1.5rem;
    border: 1px solid #e2e8f0;
    height: fit-content;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 200px;
}

.content {
    flex: 1;
    min-width: 0;
}

main {
    width: 100%;
    box-sizing: border-box;
}
.city-filter h3 {
    margin-top: 0;
    font-size: 1.15rem;
    color: var(--primary);
    margin-bottom: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.city-filter label {
    display: flex;
    align-items: center;
    gap: 0.5em;
    margin-bottom: 0.7rem;
    font-size: 1.05rem;
    cursor: pointer;
    padding: 0.4em 0.2em 0.4em 0;
    border-radius: 6px;
    transition: background 0.2s;
}
.city-filter label:hover {
    background: #f1f5f9;
}

.city-filter input[type="checkbox"] {
    margin-right: 0.5em;
    accent-color: var(--primary);
    width: 1.1em;
    height: 1.1em;
    border-radius: 4px;
    border: 1.5px solid #cbd5e1;
    transition: box-shadow 0.2s;
}
.city-filter input[type="checkbox"]:focus {
    outline: 2px solid var(--primary);
    box-shadow: 0 0 0 2px #dbeafe;
}

.job-card { 
    background: white; 
    padding: 1.5rem; 
    border-radius: 12px; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.1); 
    margin-bottom: 1rem; 
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.job-card:hover { 
    border-color: var(--primary); 
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); 
}

.job-title { 
    font-size: 1.2rem; 
    font-weight: 700; 
    color: var(--dark);
    margin: 0 0 0.5rem 0;
}

.employer { color: var(--primary); font-weight: 500; margin-bottom: 0.25rem; }
.location { color: #64748b; font-size: 0.9rem; margin-bottom: 1rem; }

.apply-btn { 
    display: inline-block; 
    background: var(--primary); 
    color: white; 
    padding: 0.6rem 1.2rem; 
    text-decoration: none; 
    border-radius: 6px; 
    font-weight: 600;
    font-size: 0.9rem;
}

.date-tag {
    font-size: 0.8rem;
    color: #64748b;
    float: right;
}

.skill-badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

.skill-junior {
    background-color: #dbeafe;
    color: #075985;
}

.skill-mid {
    background-color: #fef3c7;
    color: #92400e;
}

.skill-senior {
    background-color: #fecaca;
    color: #7f1d1d;
}

.job-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 1rem 0;
}

.job-info span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: #475569;
}

.job-info i {
    color: var(--primary);
    font-size: 1.25rem;
}

.job-meta {
    margin: 10px 0;
}

.salary {
    color: #059669; /* A professional green */
    font-weight: 600;
}

.description-snippet {
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.6;
    margin: 15px 0;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
}

.apply-btn {
    display: block;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    margin-top: 1.5rem;
}

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

.controls {
    width: 100%;
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
    box-sizing: border-box;
}

.filters-container {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    min-width: 150px;
}

.filter-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--dark);
}

.filter-group select {
    padding: 10px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    background-color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.filter-group select:hover {
    border-color: var(--primary);
}

.filter-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
}

.search-container {
    position: relative;
    margin-bottom: 1rem;
}

#searchInput {
    width: 100%;
    padding: 14px 16px;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    font-size: 1.05rem;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    box-sizing: border-box;
}

#searchInput:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

#searchInput::placeholder {
    color: #94a3b8;
}

#status-bar {
    font-size: 0.9rem;
    color: #64748b;
    padding: 0.5rem 0;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin: 40px 0;
    padding: 20px 1rem;
    flex-wrap: wrap;
}

.pagination button {
    padding: 10px 20px;
    border-radius: 8px;
    border: 2px solid var(--primary);
    background: var(--primary);
    color: white;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.pagination button:hover:not(:disabled) {
    background: white;
    color: var(--primary);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
    transform: translateY(-2px);
}

.pagination button:disabled {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #94a3b8;
    cursor: not-allowed;
    opacity: 0.6;
}

#pageInfo {
    font-weight: 600;
    color: var(--dark);
    min-width: 100px;
    text-align: center;
}

#results-count {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #64748b;
}

footer {
    background: white;
    border-top: 1px solid #e2e8f0;
    padding: 2rem 1rem;
    text-align: center;
    margin-top: auto;
}

footer p {
    margin: 0 0 1rem 0;
    color: #64748b;
    font-size: 0.95rem;
}

footer .footer-links {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

footer .footer-links a {
    color: var(--primary);
    text-decoration: none;
    margin: 0 1rem;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

footer .footer-links a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* ============================================
   RESPONSIVE DESIGN - MOBILE FIRST
   ============================================ */

/* Tablets (768px and up) */
@media (min-width: 768px) {
    .menu-toggle {
        display: none !important;
    }
    
    .mobile-nav {
        display: none !important;
    }
    
    header {
        padding: 2rem 1rem;
    }
    
    .main-layout {
        margin: 2rem 1rem;
        gap: 2rem;
    }
    
    .sidebar {
        width: 240px;
        margin-top: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .controls {
        max-width: none;
        margin: 2rem auto;
    }
    
    .filters-container {
        flex-wrap: nowrap;
    }
}

/* Small screens (mobile) */
@media (max-width: 767px) {
    .menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        z-index: 1001;
    }
    
    .mobile-nav {
        display: flex !important;
        position: fixed !important;
        top: 100px !important;
        right: 0 !important;
        left: auto !important;
        width: 250px !important;
        max-height: 0 !important;
        overflow: hidden !important;
        transition: max-height 0.3s ease !important;
    }
    
    .mobile-nav.active {
        max-height: 400px !important;
    }
    
    header {
        padding: 1rem;
    }
    
    h1 {
        font-size: 1.3rem;
        margin: 0.5rem 0;
    }
    
    header > p {
        font-size: 0.8rem;
    }
    
    .main-layout {
        flex-direction: column;
        margin: 1rem;
        gap: 1rem;
    }
    
    .sidebar {
        width: 100%;
        min-width: auto;
        padding: 1.5rem;
        margin-top: 0;
        margin-bottom: 0;
    }
    
    .content {
        flex: 1;
        width: 100%;
    }
    
    .controls {
        width: 100%;
        max-width: 100%;
        margin: 1.5rem 0;
        padding: 0;
    }
    
    .search-container {
        margin-bottom: 1rem;
    }
    
    #searchInput {
        padding: 12px 14px;
        font-size: 1rem;
    }
    
    .filters-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .filter-group {
        flex: 1;
        min-width: auto;
        width: 100%;
    }
    
    .filter-group select {
        width: 100%;
        padding: 12px;
    }
    
    .job-card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .job-title {
        font-size: 1.1rem;
    }
    
    .job-info {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .job-info span {
        font-size: 0.9rem;
    }
    
    .date-tag {
        float: none;
        display: block;
        margin-top: 0.5rem;
    }
    
    .apply-btn {
        display: block;
        width: 100%;
        text-align: center;
        padding: 0.6rem 1rem;
        margin-top: 1rem;
        box-sizing: border-box;
    }
    
    .pagination {
        flex-direction: column;
        gap: 0.5rem;
        padding: 1rem;
    }
    
    .pagination button {
        width: 100%;
        padding: 12px;
    }
    
    #pageInfo {
        width: 100%;
    }
    
    footer {
        padding: 1.5rem 1rem;
    }
    
    footer p {
        font-size: 0.85rem;
    }
    
    footer .footer-links {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    footer .footer-links a {
        margin: 0.5rem 0;
        display: block;
    }
    
    .city-filter h3 {
        font-size: 1rem;
    }
    
    .city-filter label {
        font-size: 0.95rem;
    }
}

/* Extra small screens (phones) */
@media (max-width: 480px) {
    h1 {
        font-size: 1.1rem;
    }
    
    header > p {
        font-size: 0.75rem;
    }
    
    .job-title {
        font-size: 1rem;
    }
    
    .employer {
        font-size: 0.9rem;
    }
    
    .location {
        font-size: 0.85rem;
    }
    
    .skill-badge {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }
    
    .pagination {
        gap: 0.25rem;
    }
    
    .pagination button {
        font-size: 0.85rem;
        padding: 10px;
    }
    
    .controls {
        margin: 1rem 0;
    }
    
    .main-layout {
        margin: 0.5rem;
        gap: 0.5rem;
    }
}