/* ===== Careers Portal Styles ===== */

/* Global */
html, body {
    font-family: 'Roboto', 'Segoe UI', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #F5F5F5;
}

/* Hero Section */
.careers-hero {
    background: linear-gradient(135deg, #FF6F00 0%, #FF8F00 30%, #4CAF50 70%, #324706 100%);
    padding: 80px 24px 100px;
    text-align: center;
    color: white;
    position: relative;
}

.careers-hero h1 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.careers-hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Stats Bar */
.stats-bar {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 32px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stat-item .stat-number {
    font-size: 2rem;
    font-weight: 700;
}

.stat-item .stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Filter Bar */
.filter-bar-wrapper {
    max-width: 1000px;
    margin: -40px auto 24px;
    padding: 0 24px;
    position: relative;
    z-index: 10;
}

.filter-bar {
    background: white;
    border-radius: 12px;
    padding: 16px 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-bar .mud-input-control {
    flex: 1;
    min-width: 180px;
}

/* Job Cards Grid */
.job-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px 40px;
}

/* Job Card */
.job-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #E0E0E0;
    transition: all 0.2s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.job-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
    border-color: #FF6F00;
}

.job-card-header {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 16px;
}

.job-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    color: white;
    flex-shrink: 0;
}

.job-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.job-card-dept {
    font-size: 0.85rem;
    color: #777;
}

.job-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
    font-size: 0.85rem;
    color: #666;
}

.job-card-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.job-card-salary {
    color: #4CAF50;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 16px;
}

.job-card-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
    flex-grow: 1;
}

.skill-tag {
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid;
}

.skill-tag.required {
    background: #E8F5E9;
    color: #2E7D32;
    border-color: #C8E6C9;
}

.skill-tag.nice-to-have {
    background: #F5F5F5;
    color: #757575;
    border-color: #E0E0E0;
}

.job-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid #F0F0F0;
}

.job-card-date {
    font-size: 0.8rem;
    color: #999;
}

/* Job Detail Page */
.job-detail-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px;
}

.job-detail-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.job-detail-content {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
}

.job-detail-main .section-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    border: 1px solid #E0E0E0;
}

.job-detail-sidebar .sidebar-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid #E0E0E0;
}

.salary-card {
    background: #E8F5E9 !important;
    border-color: #C8E6C9 !important;
}

.salary-range {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2E7D32;
}

.cta-card {
    background: #333 !important;
    border-color: #333 !important;
    color: white;
    text-align: center;
}

.cta-card h3 {
    color: white;
    margin-bottom: 8px;
}

.cta-card p {
    color: #CCC;
    margin-bottom: 16px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #F0F0F0;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-item .detail-label {
    font-size: 0.85rem;
    color: #999;
    min-width: 100px;
}

.detail-item .detail-value {
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
}

/* Application Wizard */
.application-wizard {
    max-width: 800px;
    margin: 0 auto;
    padding: 24px;
}

.wizard-stepper {
    margin-bottom: 32px;
}

.wizard-step-content {
    background: white;
    border-radius: 12px;
    padding: 32px;
    border: 1px solid #E0E0E0;
    min-height: 300px;
}

.wizard-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 24px;
}

/* Work History Entry */
.work-history-entry {
    background: #FAFAFA;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid #E0E0E0;
    position: relative;
}

.work-history-entry .remove-btn {
    position: absolute;
    top: 8px;
    right: 8px;
}

/* Application Success */
.success-container {
    text-align: center;
    padding: 60px 24px;
    max-width: 600px;
    margin: 0 auto;
}

.success-icon {
    color: #4CAF50;
    font-size: 64px;
    margin-bottom: 24px;
}

/* Header */
.careers-header {
    background: white;
    border-bottom: 1px solid #E0E0E0;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.careers-header-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.careers-header-logo img {
    height: 36px;
}

.careers-header-logo span {
    font-weight: 600;
    font-size: 1.1rem;
    color: #333;
}

.careers-header-nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.careers-header-nav a {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.careers-header-nav a:hover {
    color: #FF6F00;
}

/* Footer */
.careers-footer {
    background: #333;
    color: white;
    padding: 40px 24px 24px;
    margin-top: 60px;
}

.careers-footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;
}

.careers-footer-section h4 {
    margin-bottom: 12px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.careers-footer-section a {
    color: #CCC;
    text-decoration: none;
    font-size: 0.85rem;
    display: block;
    margin-bottom: 8px;
}

.careers-footer-section a:hover {
    color: #FF6F00;
}

.careers-footer-bottom {
    max-width: 1200px;
    margin: 24px auto 0;
    padding-top: 24px;
    border-top: 1px solid #555;
    text-align: center;
    font-size: 0.8rem;
    color: #999;
}

/* Pagination */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    padding: 24px 0 40px;
}

/* Loading state */
.jobs-loading {
    display: flex;
    justify-content: center;
    padding: 60px 0;
}

/* No results */
.no-results {
    text-align: center;
    padding: 60px 24px;
}

/* ═══════════════════════════════════════════════════════════════
   Hamburger + mobile drawer
   ─────────────────────────────────────────────────────────────── */
.careers-hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 32px; height: 28px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}
.careers-hamburger span {
    display: block;
    height: 3px;
    width: 100%;
    background: #333;
    border-radius: 2px;
    transition: transform 0.2s, opacity 0.2s;
}
.careers-hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.careers-hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.careers-hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

.careers-mobile-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 90;
    opacity: 0;
    transition: opacity 0.2s;
}
.careers-mobile-overlay.open { opacity: 1; display: block; }

.careers-mobile-drawer {
    display: none;
    position: fixed;
    top: 64px;
    left: 0; right: 0;
    background: white;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 99;
    padding: 8px 0;
    transform: translateY(-16px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.22s ease, opacity 0.22s ease;
}
.careers-mobile-drawer.open {
    display: block;
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}
.careers-mobile-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    font-size: 15px;
    color: #212121;
    text-decoration: none;
    font-weight: 500;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
}
.careers-mobile-item:hover,
.careers-mobile-item:focus { background: #FFF3E0; outline: none; }
.careers-mobile-lang { color: #616161; }
.careers-mobile-divider {
    height: 1px;
    background: #EEE;
    margin: 4px 12px;
}

/* ═══════════════════════════════════════════════════════════════
   Mobile breakpoint
   ─────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .careers-header { padding: 0 16px; }
    .careers-header-logo span { font-size: 1rem; }
    .careers-header-logo img { height: 28px; }
    .careers-header-nav { display: none; }
    .careers-hamburger { display: flex; }

    .careers-hero h1 {
        font-size: 1.75rem;
        line-height: 1.2;
    }
    .careers-hero {
        padding: 32px 16px;
    }

    .stats-bar {
        flex-direction: column;
        gap: 12px;
        align-items: center;
        padding: 20px 16px;
    }

    .filter-bar {
        flex-direction: column;
        gap: 10px;
        padding: 12px 16px;
    }

    .job-cards-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 0 12px;
    }

    .job-card { padding: 14px; }
    .job-card-title { font-size: 15px; }
    .job-card-meta { flex-wrap: wrap; gap: 8px; }

    .job-detail-container { padding: 16px 12px; }
    .job-detail-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 12px;
    }
    .job-detail-header > div:last-child {
        width: 100%;
        display: flex;
        gap: 8px;
    }
    .job-detail-header > div:last-child .mud-button { flex: 1; }
    .job-detail-content {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .wizard-step-content { padding: 16px; }
    .wizard-stepper { overflow-x: auto; }

    /* Careers "closed job" banner text on mobile */
    .jd-closed-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .jd-closed-banner .mud-button { align-self: stretch; }
}

/* Slightly larger phones + small tablets */
@media (min-width: 481px) and (max-width: 768px) {
    .job-cards-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Blazor error UI */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* ═══════════════════════════════════════════════════════════
   Deadline / closed-role states
   ─────────────────────────────────────────────────────────── */

/* Closed card — desaturated + red banner strip along the top */
.job-card-closed {
    position: relative;
    background: #FAFAFA;
    border-color: #EEE;
    padding-top: 44px; /* room for the closed banner */
    filter: saturate(0.6);
}
.job-card-closed:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.job-card-closed .job-card-icon {
    opacity: 0.55;
}
.job-card-closed-banner {
    position: absolute;
    top: 0; left: 0; right: 0;
    background: linear-gradient(135deg, #C62828, #B71C1C);
    color: white;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    border-top-left-radius: inherit;
    border-top-right-radius: inherit;
}

/* Closing-soon (≤ 3 days) — amber pill in the top-right */
.job-card { position: relative; }
.job-card-soon-badge {
    position: absolute;
    top: 12px; right: 12px;
    background: #FFF3E0;
    color: #E65100;
    border: 1px solid #FFCC80;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 3px 10px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 1;
}

/* JobDetail page — full-width closed banner */
.jd-closed-banner {
    display: flex;
    gap: 16px;
    align-items: center;
    background: linear-gradient(135deg, #FFEBEE, #FFCDD2);
    border: 1px solid #FFCDD2;
    border-left: 4px solid #C62828;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 20px;
    color: #B71C1C;
}
.jd-closed-banner .mud-icon-root { color: #C62828; font-size: 32px; }
.jd-closed-title  { font-size: 16px; font-weight: 700; margin-bottom: 2px; }
.jd-closed-body   { font-size: 13px; color: #5D4037; line-height: 1.5; }

.jd-soon-banner {
    display: flex;
    gap: 12px;
    align-items: center;
    background: linear-gradient(135deg, #FFF8E1, #FFE0B2);
    border-left: 4px solid #FF6F00;
    border-radius: 10px;
    padding: 10px 16px;
    margin-bottom: 16px;
    color: #5D4037;
    font-size: 13px;
}
.jd-soon-banner .mud-icon-root { color: #E65100; }

/* JobDetail sidebar — highlight the passed-deadline row */
.detail-item-closed .detail-value { color: #C62828; }

/* JobDetail sidebar CTA — closed variant */
.cta-card-closed {
    background: linear-gradient(135deg, #FFEBEE, #FFF5F5);
    border: 1px solid #FFCDD2;
    text-align: center;
}
.cta-card-closed h3 { margin: 8px 0 4px; }
.cta-card-closed p  { color: #5D4037; font-size: 13px; margin-bottom: 12px; }

