/**
 * USInfoHub Jobs Portal Stylesheet - Rebuilt & Polished Typography
 */

:root {
    --us-jobs-primary: #1e3a8a;       /* Deep navy */
    --us-jobs-primary-hover: #172554;
    --us-jobs-accent: #0284c7;        /* Crisp blue */
    --us-jobs-success: #059669;       /* Emerald */
    --us-jobs-success-dark: #065f46;
    --us-jobs-text: #1f2937;          /* Slate 800 */
    --us-jobs-text-muted: #4b5563;    /* Slate 600 */
    --us-jobs-border: #e2e8f0;        /* Slate 200 */
    --us-jobs-bg-subtle: #f8fafc;     /* Slate 50 */
    --us-jobs-font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    --us-jobs-radius: 8px;
    --us-jobs-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
    --us-jobs-shadow-hover: 0 6px 16px rgba(0, 0, 0, 0.08);
}

/* ==========================================================================
   Global Reset & Container
   ========================================================================== */
.usinfohub-jobs-container,
.usinfohub-single-job-wrapper,
.usinfohub-post-job-wrapper,
.usinfohub-archive-jobs-wrapper {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
    font-family: var(--us-jobs-font-stack);
    color: var(--us-jobs-text);
    box-sizing: border-box;
}

/* ==========================================================================
   Archive & Filter Bar
   ========================================================================== */
.usinfohub-archive-hero {
    background: linear-gradient(135deg, #1e3a8a 0%, #0369a1 100%);
    color: #ffffff;
    padding: 44px 20px;
    text-align: center;
    border-radius: var(--us-jobs-radius);
    margin-bottom: 28px;
}

.usinfohub-archive-hero .archive-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0 0 10px;
    color: #ffffff;
    font-family: var(--us-jobs-font-stack);
}

.usinfohub-archive-hero .archive-subtitle {
    font-size: 1.05rem;
    opacity: 0.92;
    max-width: 720px;
    margin: 0 auto;
    line-height: 1.6;
}

.usinfohub-jobs-filter-bar {
    background: #ffffff;
    border: 1px solid var(--us-jobs-border);
    border-radius: var(--us-jobs-radius);
    padding: 18px;
    box-shadow: var(--us-jobs-shadow);
    margin-bottom: 24px;
}

.filter-row-primary {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.filter-col {
    flex: 1 1 180px;
}

.filter-col.search-col {
    flex: 2 1 240px;
}

.filter-col input[type="text"],
.filter-col select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--us-jobs-border);
    border-radius: 6px;
    font-size: 0.95rem;
    background-color: #ffffff;
    color: var(--us-jobs-text);
    outline: none;
    box-sizing: border-box;
    font-family: var(--us-jobs-font-stack);
}

.filter-col input[type="text"]:focus,
.filter-col select:focus {
    border-color: var(--us-jobs-accent);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.filter-col.submit-col {
    flex: 0 0 auto;
}

.btn-filter-submit {
    background-color: var(--us-jobs-primary);
    color: #ffffff;
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background-color 0.2s ease;
    white-space: nowrap;
    font-family: var(--us-jobs-font-stack);
}

.btn-filter-submit:hover {
    background-color: var(--us-jobs-primary-hover);
}

.usinfohub-jobs-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--us-jobs-border);
}

.results-count {
    font-size: 0.95rem;
    color: var(--us-jobs-text-muted);
}

.btn-post-job-cta {
    background-color: var(--us-jobs-success);
    color: #ffffff !important;
    padding: 8px 18px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none !important;
    border-radius: 6px;
    transition: opacity 0.2s ease;
}

.btn-post-job-cta:hover {
    opacity: 0.92;
}

/* ==========================================================================
   Job Cards Grid
   ========================================================================== */
.usinfohub-jobs-cards-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.usinfohub-job-card {
    background: #ffffff;
    border: 1px solid var(--us-jobs-border);
    border-left: 4px solid var(--us-jobs-accent);
    border-radius: var(--us-jobs-radius);
    padding: 22px;
    box-shadow: var(--us-jobs-shadow);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.usinfohub-job-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--us-jobs-shadow-hover);
}

.usinfohub-job-card.featured {
    border-left-color: #f59e0b;
    background-color: #fffdf5;
}

.company-badge-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.company-name {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--us-jobs-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.verified-biz-pill {
    background-color: #ecfdf5;
    color: var(--us-jobs-success-dark);
    border: 1px solid #a7f3d0;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
}

.job-title {
    margin: 4px 0 12px;
    font-size: 1.28rem;
    font-weight: 700;
    line-height: 1.35;
}

.job-title a {
    color: var(--us-jobs-text);
    text-decoration: none;
    transition: color 0.15s ease;
}

.job-title a:hover {
    color: var(--us-jobs-accent);
}

.job-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 0.8rem;
    font-weight: 500;
    border-radius: 6px;
    background-color: var(--us-jobs-bg-subtle);
    border: 1px solid var(--us-jobs-border);
    color: var(--us-jobs-text);
}

.badge.workplace-badge.remote {
    background-color: #eff6ff;
    border-color: #bfdbfe;
    color: #1e40af;
    font-weight: 600;
}

.badge.workplace-badge.onsite {
    background-color: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

.badge.workplace-badge.hybrid {
    background-color: #faf5ff;
    border-color: #e9d5ff;
    color: #6b21a8;
}

.badge.salary-badge {
    background-color: #fefce8;
    border-color: #fef08a;
    color: #854d0e;
    font-weight: 600;
}

.job-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px dashed var(--us-jobs-border);
}

.posted-time {
    font-size: 0.825rem;
    color: var(--us-jobs-text-muted);
}

.btn-card-apply {
    color: var(--us-jobs-accent);
    font-weight: 600;
    font-size: 0.925rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-card-apply:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Single Job Page Layout & Unified Typography
   ========================================================================== */
.usinfohub-job-breadcrumbs {
    font-size: 0.875rem;
    color: var(--us-jobs-text-muted);
    margin-bottom: 22px;
}

.usinfohub-job-breadcrumbs a {
    color: var(--us-jobs-accent);
    text-decoration: none;
}

.usinfohub-job-breadcrumbs .sep {
    margin: 0 6px;
    color: #94a3b8;
}

.usinfohub-job-hero {
    background: #ffffff;
    border: 1px solid var(--us-jobs-border);
    border-radius: var(--us-jobs-radius);
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    box-shadow: var(--us-jobs-shadow);
    margin-bottom: 30px;
}

.hero-job-title {
    font-size: 2.1rem;
    font-weight: 700;
    margin: 8px 0 16px;
    color: var(--us-jobs-text);
    font-family: var(--us-jobs-font-stack);
    line-height: 1.25;
}

.hero-company {
    font-size: 1rem;
    font-weight: 600;
    color: var(--us-jobs-text-muted);
}

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

.job-hero-cta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
}

.hero-apply-subtext {
    font-size: 0.775rem;
    color: var(--us-jobs-text-muted);
}

.btn-primary-apply {
    background-color: var(--us-jobs-primary);
    color: #ffffff !important;
    padding: 12px 26px;
    border-radius: 6px;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 1rem;
    display: inline-block;
    white-space: nowrap;
    text-align: center;
    transition: background-color 0.2s ease, transform 0.1s ease;
    box-shadow: 0 2px 4px rgba(30, 58, 138, 0.2);
    font-family: var(--us-jobs-font-stack);
}

.btn-primary-apply:hover {
    background-color: var(--us-jobs-primary-hover);
    transform: translateY(-1px);
}

.btn-primary-apply.large {
    padding: 14px 34px;
    font-size: 1.05rem;
}

.btn-primary-apply.full-width {
    width: 100%;
    box-sizing: border-box;
}

/* Grid Layout */
.usinfohub-job-grid {
    display: grid;
    grid-template-columns: 2.2fr 1fr;
    gap: 30px;
}

.job-description-box {
    background: #ffffff;
    border: 1px solid var(--us-jobs-border);
    border-radius: var(--us-jobs-radius);
    padding: 32px;
    box-shadow: var(--us-jobs-shadow);
    margin-bottom: 28px;
}

.job-description-box h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--us-jobs-border);
    color: var(--us-jobs-text);
    font-family: var(--us-jobs-font-stack);
}

/* ==========================================================================
   UNIFIED CONTENT TYPOGRAPHY (Strips external font chaos)
   ========================================================================== */
.job-content-body {
    font-family: var(--us-jobs-font-stack) !important;
    font-size: 1rem !important;
    line-height: 1.7 !important;
    color: var(--us-jobs-text) !important;
}

.job-content-body * {
    font-family: inherit !important;
    background-color: transparent !important;
}

.job-content-body h2,
.job-content-body h3,
.job-content-body h4,
.job-content-body .h1,
.job-content-body .h2,
.job-content-body .h3 {
    color: var(--us-jobs-primary) !important;
    font-weight: 700 !important;
    margin-top: 24px !important;
    margin-bottom: 12px !important;
    line-height: 1.35 !important;
}

.job-content-body h2, .job-content-body .h1 {
    font-size: 1.25rem !important;
}

.job-content-body h3, .job-content-body .h2 {
    font-size: 1.15rem !important;
}

.job-content-body h4, .job-content-body .h3 {
    font-size: 1.05rem !important;
}

.job-content-body p {
    margin-bottom: 1.2em !important;
    font-size: 1rem !important;
    line-height: 1.7 !important;
    color: var(--us-jobs-text) !important;
}

.job-content-body ul,
.job-content-body ol {
    margin: 12px 0 20px 24px !important;
    padding: 0 !important;
}

.job-content-body li {
    margin-bottom: 8px !important;
    line-height: 1.6 !important;
    color: var(--us-jobs-text) !important;
    font-size: 0.975rem !important;
}

/* ==========================================================================
   Dedicated "How to Apply" Instructions Box
   ========================================================================== */
.usinfohub-apply-instructions-box {
    background: #f8fafc;
    border: 2px solid #cbd5e1;
    border-radius: var(--us-jobs-radius);
    padding: 28px;
    margin-bottom: 30px;
    box-shadow: var(--us-jobs-shadow);
}

.apply-box-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--us-jobs-border);
    padding-bottom: 14px;
}

.apply-icon {
    font-size: 2rem;
    background: #e2e8f0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    flex-shrink: 0;
}

.apply-box-header h3 {
    margin: 0 0 4px;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--us-jobs-primary);
}

.apply-intro {
    margin: 0;
    font-size: 0.95rem;
    color: var(--us-jobs-text-muted);
}

.apply-box-content p {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 12px;
}

.apply-contact-badge {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    padding: 12px 18px;
    border-radius: 6px;
    display: inline-block;
    margin: 10px 0 16px;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--us-jobs-primary);
}

.apply-action-btn-row {
    margin: 16px 0 18px;
}

.apply-direct-link {
    font-size: 0.85rem;
    color: var(--us-jobs-text-muted);
    word-break: break-all;
    background: #ffffff;
    padding: 10px 14px;
    border-radius: 6px;
    border: 1px solid var(--us-jobs-border);
    margin-bottom: 16px;
}

.direct-link-label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
}

.apply-direct-link .raw-url {
    color: var(--us-jobs-accent);
    text-decoration: underline;
}

.apply-security-notice {
    display: flex;
    align-items: center;
    font-size: 0.8rem;
    color: var(--us-jobs-text-muted);
    background: #f1f5f9;
    padding: 8px 12px;
    border-radius: 6px;
}

/* ==========================================================================
   Sidebar Cards
   ========================================================================== */
.job-sidebar-apply-card {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: var(--us-jobs-radius);
    padding: 22px;
    box-shadow: var(--us-jobs-shadow);
    margin-bottom: 24px;
    text-align: center;
}

.job-sidebar-apply-card h4 {
    margin: 0 0 8px;
    font-size: 1.2rem;
    color: var(--us-jobs-primary);
}

.job-sidebar-apply-card p {
    font-size: 0.875rem;
    color: var(--us-jobs-text-muted);
    margin-bottom: 14px;
}

.job-summary-card,
.job-employer-cta-card {
    background: #ffffff;
    border: 1px solid var(--us-jobs-border);
    border-radius: var(--us-jobs-radius);
    padding: 22px;
    box-shadow: var(--us-jobs-shadow);
    margin-bottom: 24px;
}

.job-summary-card h3,
.job-employer-cta-card h4 {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--us-jobs-text);
}

.summary-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.summary-list li {
    padding: 9px 0;
    border-bottom: 1px solid var(--us-jobs-border);
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    gap: 8px;
}

.summary-list li:last-child {
    border-bottom: none;
}

.summary-label {
    font-weight: 600;
    color: var(--us-jobs-text-muted);
}

.summary-value {
    text-align: right;
    font-weight: 500;
}

.salary-highlight {
    color: #854d0e;
    font-weight: 700;
}

.btn-sidebar-post-job {
    display: block;
    text-align: center;
    background-color: var(--us-jobs-accent);
    color: #ffffff !important;
    padding: 10px 16px;
    border-radius: 6px;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: 12px;
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 900px) {
    .usinfohub-job-grid {
        grid-template-columns: 1fr;
    }

    .usinfohub-job-hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .job-hero-cta {
        align-items: flex-start;
        width: 100%;
    }

    .btn-primary-apply {
        width: 100%;
    }
}
