/* =====================================================
   GOVERNMENT JOB TRACKER
   MAIN STYLESHEET
===================================================== */


/* =====================================================
   RESET
===================================================== */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;

    background: #f4f6f8;
    color: #1f2937;
    line-height: 1.5;
}

a {
    color: inherit;
}


/* =====================================================
   CONTAINER
===================================================== */

.container {
    width: min(1100px, 92%);
    margin: 0 auto;
}


/* =====================================================
   HEADER
===================================================== */

.site-header {
    background: #111827;
    color: white;
    padding: 32px 0;
    border-bottom: 4px solid #2563eb;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-header h1 {
    margin: 0;
    font-size: clamp(28px, 5vw, 42px);
    line-height: 1.15;
}

.subtitle {
    margin: 10px 0 0;
    color: #cbd5e1;
    font-size: 16px;
}


/* =====================================================
   LAST UPDATED
===================================================== */

.last-updated {
    margin: 22px 0;
    padding: 12px 16px;

    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;

    color: #64748b;
    font-size: 14px;
}


/* =====================================================
   JOB SECTION
===================================================== */

.job-section {
    margin: 28px 0;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;
    margin-bottom: 14px;
}

.section-heading h2 {
    margin: 0;
    font-size: 25px;
}

.section-heading p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 14px;
}


/* =====================================================
   COUNT BADGE
===================================================== */

.count-badge {
    display: inline-flex;

    min-width: 34px;
    height: 34px;

    align-items: center;
    justify-content: center;

    padding: 0 10px;

    background: #e5e7eb;
    border-radius: 999px;

    font-size: 14px;
    font-weight: 700;
}


/* =====================================================
   CRITICAL SECTION
===================================================== */

.critical-section {
    border: 2px solid #fecaca;
    border-radius: 14px;

    padding: 20px;

    background: #fffafa;
}

.critical-section .count-badge {
    background: #fee2e2;
    color: #b91c1c;
}


/* =====================================================
   JOB CONTAINER
===================================================== */

.jobs-container {
    display: grid;
    gap: 14px;
}


/* =====================================================
   JOB CARD
===================================================== */

.job-card {
    background: white;

    border: 1px solid #e5e7eb;
    border-radius: 12px;

    padding: 18px;

    box-shadow:
        0 2px 5px rgba(0, 0, 0, 0.04);

    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease;
}

.job-card:hover {
    transform: translateY(-2px);

    box-shadow:
        0 5px 15px rgba(0, 0, 0, 0.08);
}


/* =====================================================
   JOB TITLE
===================================================== */

.job-title {
    margin: 0 0 12px;

    font-size: 19px;
    line-height: 1.35;
}

.job-title a {
    text-decoration: none;
    color: #111827;
}

.job-title a:hover {
    color: #2563eb;
}


/* =====================================================
   JOB DETAILS
===================================================== */

.job-details {
    display: grid;

    grid-template-columns:
        repeat(auto-fit, minmax(150px, 1fr));

    gap: 10px;

    margin-top: 12px;
}

.detail {
    padding: 9px 11px;

    background: #f8fafc;

    border-radius: 8px;

    font-size: 14px;
}

.detail-label {
    display: block;

    margin-bottom: 2px;

    color: #64748b;
    font-size: 12px;
}

.detail-value {
    font-weight: 600;
}


/* =====================================================
   DEADLINE
===================================================== */

.deadline {
    color: #b91c1c;
    font-weight: 700;
}


/* =====================================================
   DAYS LEFT
===================================================== */

.days-left {
    margin-top: 12px;

    font-size: 14px;
    font-weight: 700;
}

.days-left.urgent {
    color: #b91c1c;
}


/* =====================================================
   APPLY BUTTON
===================================================== */

.apply-button {
    display: inline-block;

    margin-top: 14px;

    padding: 9px 15px;

    background: #2563eb;
    color: white;

    border-radius: 7px;

    text-decoration: none;

    font-size: 14px;
    font-weight: 600;

    transition:
        background 0.15s ease;
}

.apply-button:hover {
    background: #1d4ed8;
}


/* =====================================================
   STATUS BADGES
===================================================== */

.status-badge {
    display: inline-block;

    margin-bottom: 10px;

    padding: 4px 9px;

    border-radius: 999px;

    font-size: 12px;
    font-weight: 700;
}

.status-critical {
    background: #fee2e2;
    color: #b91c1c;
}

.status-open {
    background: #dcfce7;
    color: #166534;
}

.status-upcoming {
    background: #dbeafe;
    color: #1e40af;
}

.status-old {
    background: #e5e7eb;
    color: #4b5563;
}

.status-unknown {
    background: #fef3c7;
    color: #92400e;
}


/* =====================================================
   UPCOMING
===================================================== */

#upcoming-section .job-card {
    border-left: 4px solid #3b82f6;
}


/* =====================================================
   OPEN
===================================================== */

#open-section .job-card {
    border-left: 4px solid #22c55e;
}


/* =====================================================
   EMPTY MESSAGE
===================================================== */

.empty-message {
    padding: 24px;

    background: white;

    border: 1px dashed #cbd5e1;
    border-radius: 10px;

    color: #64748b;

    text-align: center;
}


/* =====================================================
   LOADING
===================================================== */

.loading {
    padding: 24px;

    background: white;

    border-radius: 10px;

    color: #64748b;

    text-align: center;
}


/* =====================================================
   OLD JOBS LINK
===================================================== */

.old-jobs-link-section {
    margin: 40px 0;

    text-align: center;
}

.old-jobs-button {
    display: inline-block;

    padding: 12px 20px;

    background: #111827;
    color: white;

    border-radius: 8px;

    text-decoration: none;

    font-weight: 600;
}

.old-jobs-button:hover {
    background: #374151;
}


/* =====================================================
   ERROR
===================================================== */

.error-message {
    margin: 25px 0;

    padding: 15px;

    background: #fee2e2;

    border: 1px solid #fecaca;
    border-radius: 8px;

    color: #991b1b;

    text-align: center;
}

.hidden {
    display: none;
}


/* =====================================================
   FOOTER
===================================================== */

.site-footer {
    margin-top: 50px;

    padding: 30px 0;

    background: #111827;
    color: #94a3b8;

    text-align: center;

    font-size: 13px;
}

.site-footer p {
    margin: 5px 0;
}

.site-footer a {
    color: #cbd5e1;
}


/* =====================================================
   MOBILE
===================================================== */

@media (max-width: 600px) {

    .site-header {
        padding: 25px 0;
    }

    .site-header h1 {
        font-size: 28px;
    }

    .subtitle {
        font-size: 14px;
    }

    .critical-section {
        padding: 14px;
    }

    .section-heading h2 {
        font-size: 21px;
    }

    .job-card {
        padding: 15px;
    }

    .job-title {
        font-size: 17px;
    }

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

}

@media (max-width: 400px) {

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

}
