/* ============================================================
   careers.css — SCALAR Careers Page Styles V3
   Reuses: .section, .section-tag, .section-title, .btn,
           .btn-primary, .btn-outline-white, .industrial-card,
           .capability-list/.check-icon, .filter-btn/.filter-controls,
           .service-card/.services-grid from existing sheets.
   New: .openings-grid/.job-tile (flat editorial), modal, apply-steps.
   ============================================================ */

/* ----------------------------------------------------------
   Hero / Page Header
   ---------------------------------------------------------- */
.careers-header {
    padding-bottom: 100px;
}

.careers-header .page-title {
    font-size: 3rem;
    line-height: 1.2;
    letter-spacing: -0.01em;
    margin-bottom: 20px;
    max-width: 780px;
}

.careers-header .page-subtitle {
    max-width: 700px;
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 36px;
}

.hero-cta-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-outline-white {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border: 2px solid rgba(255,255,255,0.7);
    color: #fff;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s ease;
    background: transparent;
}

.btn-outline-white:hover {
    background: rgba(255,255,255,0.12);
    border-color: #fff;
    color: #fff;
}

/* ----------------------------------------------------------
   Openings section wrapper
   ---------------------------------------------------------- */
.openings-section {
    background: var(--color-bg-light, #F8FAFC);
    padding: 96px 0;
}

/* Sub-copy below heading, above filter row */
.openings-subcopy {
    font-size: 0.92rem;
    color: var(--color-text-muted, #64748B);
    text-align: center;
    margin: -24px 0 28px;
    line-height: 1.6;
}

/* ----------------------------------------------------------
   Filter controls
   — Override construction.css boxed buttons so these render
     identically to projects.css underline tabs (transparent bg,
     border-bottom only, active state gets orange bottom border).
   ---------------------------------------------------------- */
.careers-filter-controls {
    margin-bottom: 36px;
    justify-content: center;
    padding: 0;
    display: flex;
    gap: 8px;
    /* mobile: single scrollable row */
    overflow-x: auto;
    white-space: nowrap;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.careers-filter-controls::-webkit-scrollbar {
    display: none;
}

.careers-filter-controls .filter-btn {
    padding: 10px 24px;
    background: transparent !important;
    border: none !important;
    border-bottom: 2px solid #E2E8F0 !important;
    color: var(--color-text-muted, #64748B) !important;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 0 !important;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: none !important;
    transform: none !important;
}

.careers-filter-controls .filter-btn:hover {
    color: var(--color-primary, #004E92) !important;
    border-bottom-color: rgba(0, 78, 146, 0.4) !important;
    background: transparent !important;
    box-shadow: none !important;
    transform: none !important;
}

.careers-filter-controls .filter-btn.active {
    background: transparent !important;
    color: var(--color-primary, #004E92) !important;
    border-bottom-color: var(--construction-orange, #FF8C1A) !important;
    box-shadow: none !important;
    transform: none !important;
}

/* ----------------------------------------------------------
   OPENINGS GRID
   ---------------------------------------------------------- */
.openings-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    align-items: stretch;
}

/* ----------------------------------------------------------
   JOB TILE — flat, editorial, icon-led
   NO left-border stripe, NO ghost numeral
   ---------------------------------------------------------- */
.job-tile {
    background: #fff;
    border-radius: 10px;
    border: 1px solid #CBD5E1;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.07);
    padding: 24px;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: box-shadow 0.3s ease, transform 0.25s ease, border-color 0.25s ease;
    cursor: default;
}

.job-tile:hover {
    border-color: #94A3B8;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
    transform: translateY(-3px);
}

/* Top row: icon (left) + position tag (right) */
.job-tile-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

/* Icon — small 40px rounded-square, tinted bg, solid color glyph */
.job-tile-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* Division-specific icon colours */
.job-tile[data-division="solar-bess"]  .job-tile-icon {
    background: rgba(255, 140, 26, 0.10);
    color: var(--construction-orange, #FF8C1A);
}
.job-tile[data-division="general-epc"] .job-tile-icon {
    background: rgba(0, 78, 146, 0.08);
    color: var(--color-primary, #004E92);
}
.job-tile[data-division="internship"]  .job-tile-icon {
    background: rgba(74, 85, 104, 0.10);
    color: var(--steel-gray, #4A5568);
}

/* Position tag: "01 / 12" — inline next to icon */
.job-tile-tag {
    font-family: var(--font-heading, 'Space Grotesk'), sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: #94A3B8;
    font-variant-numeric: tabular-nums;
    user-select: none;
}

/* Division badge pill */
.job-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 12px;
    width: fit-content;
}

.job-tile[data-division="solar-bess"]  .job-badge {
    background: rgba(255, 140, 26, 0.12);
    color: var(--construction-orange, #FF8C1A);
}
.job-tile[data-division="general-epc"] .job-badge {
    background: rgba(0, 78, 146, 0.09);
    color: var(--color-primary, #004E92);
}
.job-tile[data-division="internship"]  .job-badge {
    background: rgba(74, 85, 104, 0.11);
    color: var(--steel-gray, #4A5568);
}

/* Also colour the badge in the modal header */
.job-badge-solar-bess {
    background: rgba(255, 140, 26, 0.12);
    color: var(--construction-orange, #FF8C1A);
}
.job-badge-general-epc {
    background: rgba(0, 78, 146, 0.09);
    color: var(--color-primary, #004E92);
}
.job-badge-internship {
    background: rgba(74, 85, 104, 0.11);
    color: var(--steel-gray, #4A5568);
}

/* Title — 2-line clamp */
.job-tile-title {
    font-family: var(--font-heading, 'Space Grotesk'), sans-serif;
    font-size: 1.0rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--color-text-dark, #1E293B);
    margin: 0 0 8px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.7em; /* reserve two lines so all rows align */
}

/* Summary — 3-line clamp, flex-grow pins meta+button to bottom */
.job-tile-summary {
    font-size: 0.875rem;
    color: var(--color-text-muted, #64748B);
    line-height: 1.6;
    margin: 0 0 16px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Meta row */
.job-tile-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin-bottom: 20px;
}

.job-tile-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.78rem;
    color: var(--color-text-muted, #64748B);
    white-space: nowrap;
}

.job-tile-meta span i {
    font-size: 0.72rem;
    color: #94A3B8;
}

/* Text-link CTA — no border/background box */
.job-tile-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    padding: 0;
    margin-top: auto;
    font-family: var(--font-body, 'Manrope'), sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: gap 0.2s ease, color 0.2s ease;
    /* colour set per division below */
}

.job-tile-link i {
    font-size: 0.78rem;
    transition: transform 0.2s ease;
}

.job-tile-link:hover i {
    transform: translateX(4px);
}

.job-tile[data-division="solar-bess"]  .job-tile-link { color: var(--construction-orange, #FF8C1A); }
.job-tile[data-division="general-epc"] .job-tile-link { color: var(--color-primary, #004E92); }
.job-tile[data-division="internship"]  .job-tile-link { color: var(--steel-gray, #4A5568); }

/* ----------------------------------------------------------
   MODAL
   ---------------------------------------------------------- */
.job-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 22, 40, 0.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999 !important;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.25s ease;
    overscroll-behavior: contain;
}

.job-modal-overlay:not([hidden]) {
    opacity: 1;
}

.job-modal-overlay[hidden] {
    display: none;
}

.job-modal {
    background: #fff;
    border-radius: 14px;
    max-width: 960px;
    width: 94%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 0;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.30);
    transform: scale(0.96);
    transition: transform 0.25s ease;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.job-modal-overlay:not([hidden]) .job-modal {
    transform: scale(1);
}

/* Top accent stripe — one clear color statement, nothing else on the chrome */
.job-modal::before {
    content: '';
    display: block;
    width: 100%;
    height: 6px;
    border-radius: 14px 14px 0 0;
    background: repeating-linear-gradient(
        90deg,
        var(--construction-orange, #FF8C1A) 0 30px,
        #1a202c 30px 60px
    );
}

.job-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    border-radius: 50%;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    color: #94A3B8;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease;
    z-index: 2;
}

.job-modal-close:hover {
    background: rgba(255, 140, 26, 0.10);
    color: var(--construction-orange, #FF8C1A);
}

/* Modal header — icon small/inline, tinted top section for visual pop */
.job-modal-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 32px 40px 26px;
    background: #F8FAFC;
    border-bottom: 1px solid #E2E8F0;
}

/* Modal icon: small rounded-square matching tile icon style */
.job-modal-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
    background: #fff;
    border: 1px solid #E2E8F0;
    color: var(--color-primary, #004E92);
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.05);
}

.job-modal-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}

/* Badge colour variants in modal */
.job-modal-badge.job-badge-solar-bess  { background: rgba(255, 140, 26, 0.12); color: var(--construction-orange, #FF8C1A); }
.job-modal-badge.job-badge-general-epc { background: rgba(0, 78, 146, 0.09);   color: var(--color-primary, #004E92); }
.job-modal-badge.job-badge-internship  { background: rgba(74, 85, 104, 0.11);  color: var(--steel-gray, #4A5568); }

.job-modal-title {
    font-family: var(--font-heading, 'Space Grotesk'), sans-serif;
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--color-text-dark, #1E293B);
    margin: 0;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

/* Top pop details: location, experience, and openings right in the header */
.job-modal-meta {
    margin-top: 12px;
    font-size: 0.88rem;
    color: var(--color-text-muted, #64748B);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.job-modal-meta i {
    color: var(--color-primary, #004E92);
}

/* Modal body */
.job-modal-body {
    padding: 32px 40px 40px;
}

.job-modal-body .job-body-section {
    margin-bottom: 24px;
}

.job-modal-body .job-body-section:last-child {
    margin-bottom: 0;
}

.job-modal-body .job-body-section h4 {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--color-text-dark, #1E293B);
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 2px solid #F1F5F9;
}

.job-modal-body .job-body-section p {
    font-size: 0.96rem;
    color: #4A5568;
    line-height: 1.7;
    margin: 0;
}

.job-modal-body .capability-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.job-modal-body .capability-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.95rem;
    color: #4A5568;
    line-height: 1.6;
    margin-bottom: 8px;
}

.job-modal-body .capability-list li .check-icon {
    color: var(--construction-orange, #FF8C1A);
    font-size: 0.78rem;
    margin-top: 4px;
    flex-shrink: 0;
}

/* Salary pill */
.salary-pill {
    display: inline-block;
    background: rgba(255, 140, 26, 0.10);
    color: var(--construction-orange, #FF8C1A);
    font-size: 0.88rem;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 20px;
    border: 1px solid rgba(255, 140, 26, 0.25);
    margin-top: 4px;
}

.certificate-note {
    display: inline-block;
    background: rgba(0, 78, 146, 0.07);
    color: var(--color-primary, #004E92);
    font-size: 0.88rem;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 20px;
    border: 1px solid rgba(0, 78, 146, 0.18);
    margin-top: 4px;
    font-style: italic;
}

/* Discipline sub-lists */
.discipline-sub-groups {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.discipline-group-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--color-primary, #004E92);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 2px;
    display: inline-block;
}

.discipline-group-body {
    font-size: 0.875rem;
    color: #4A5568;
    line-height: 1.6;
    margin-left: 12px;
}

.job-apply-btn {
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid #E2E8F0;
    display: flex;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap;
}

.modal-close-bottom-btn {
    background: #E2E8F0 !important;
    color: #4A5568 !important;
    border: 2px solid #E2E8F0 !important;
    font-weight: 600;
    padding: 10px 22px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.modal-close-bottom-btn:hover {
    background: #CBD5E1 !important;
    color: #1E293B !important;
    border-color: #CBD5E1 !important;
}

/* ----------------------------------------------------------
   Why Join Section
   ---------------------------------------------------------- */
.why-join-section {
    background: #fff;
}

.service-card-eyebrow {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--construction-orange, #FF8C1A);
    margin-bottom: 8px;
}

/* ----------------------------------------------------------
   How to Apply
   ---------------------------------------------------------- */
.apply-section {
    background: var(--color-bg-light, #F8FAFC);
    padding: 96px 0;
}

.apply-intro {
    font-size: 1rem;
    color: var(--color-text-muted, #64748B);
    line-height: 1.7;
    max-width: 640px;
    margin: 0 auto 48px;
    text-align: center;
}

.apply-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    position: relative;
    margin-bottom: 56px;
}

.apply-steps::before {
    content: '';
    position: absolute;
    top: 28px;
    left: calc(12.5% + 4px);
    right: calc(12.5% + 4px);
    height: 2px;
    background: linear-gradient(to right, var(--color-primary, #004E92), var(--construction-orange, #FF8C1A));
    z-index: 0;
}

.apply-step {
    text-align: center;
    padding: 0 16px;
    position: relative;
    z-index: 1;
}

.apply-step-number {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--color-primary, #004E92);
    color: #fff;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    border: 3px solid #fff;
    box-shadow: 0 4px 14px rgba(0, 78, 146, 0.3);
    position: relative;
    z-index: 2;
    transition: background 0.3s ease, transform 0.3s ease;
}

.apply-step-number i {
    font-size: 1rem;
}

.apply-step:hover .apply-step-number {
    background: var(--construction-orange, #FF8C1A);
    transform: scale(1.08);
    box-shadow: 0 6px 18px rgba(255, 140, 26, 0.35);
}

.apply-step-text {
    font-size: 0.875rem;
    color: var(--color-text-muted, #64748B);
    line-height: 1.6;
}

.apply-email-callout {
    max-width: 560px;
    margin: 0 auto;
    text-align: center;
}

.apply-email-callout h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-text-dark, #1E293B);
    margin-bottom: 16px;
}

.apply-email-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}

.apply-email-links a {
    color: var(--construction-orange, #FF8C1A);
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.apply-email-links a:hover {
    color: var(--color-primary, #004E92);
}

.apply-subject-note {
    font-size: 0.8rem;
    color: var(--color-text-muted, #64748B);
    font-style: italic;
    margin: 0;
}

/* ----------------------------------------------------------
   Responsive
   ---------------------------------------------------------- */
@media (max-width: 1024px) {
    .openings-section,
    .apply-section {
        padding: 72px 0;
    }

    .openings-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .apply-steps {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
    }

    .apply-steps::before {
        display: none;
    }
}

@media (max-width: 640px) {
    .openings-grid {
        grid-template-columns: 1fr;
    }

    .job-tile {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .openings-section,
    .apply-section {
        padding: 56px 0;
    }

    .careers-header .page-title {
        font-size: 2.1rem;
    }

    .careers-header .page-subtitle {
        font-size: 0.95rem;
    }

    .hero-cta-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .apply-steps {
        grid-template-columns: 1fr;
    }

    .job-modal-header {
        padding: 20px 20px 16px;
    }

    .job-modal-body {
        padding: 20px 20px 28px;
    }

    .job-modal {
        max-height: 92vh;
    }

    .openings-subcopy {
        font-size: 0.85rem;
        margin: -16px 0 24px;
    }
}
