﻿/* Hero + job-filter styles live in styles/hero.css (shared across pages) */

/* ==========================================================================
   Careers / Job listing
   ========================================================================== */
.careers {
    padding: 40px 16px;
    background-color: #fbfbfb;
}

.careers__container {
    width: 100%;
    max-width: 1280px;
    margin-inline: auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.careers__title {
    margin: 0;
    font-family: var(--font-base);
    font-weight: 500;
    font-size: clamp(24px, 4vw, 32px);
    line-height: 1.4;
    color: var(--color-neutral-900);
}

.careers__layout {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.careers__main {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.careers__head {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.careers__divider {
    width: 100%;
    height: 1px;
    background-color: var(--color-neutral-200);
}

/* ---- Member-company brand filter ---- */
.brand-bar {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    align-items: center;
    gap: 8px;
    width: 100%;
}

.brand-bar__item {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 90 / 48;
    padding: 8px;
    border: 1px solid #F3F4F6;
    background-color: var(--color-white);
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease;
}

.brand-bar__item img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.brand-bar__item.is-active,
.brand-bar__item:hover {
    background-color: var(--color-white);
    border-color: var(--color-primary);
}

/* ---- Toolbar (sort + view toggle) ---- */
.jobs-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

/* Shared dropdown look (sort + page size) */
.job-dropdown {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    height: 48px;
    padding: 12px;
    border: 1px solid var(--color-neutral-200);
    border-radius: 0;
    background-color: var(--color-white);
    color: var(--color-neutral-500);
    font-family: var(--font-base);
    font-weight: 500;
    font-size: 16px;
    line-height: 26px;
    white-space: nowrap;
    cursor: pointer;
}

.job-dropdown.dropdown-toggle::after {
    display: none;
}

.job-dropdown__value {
    font-weight: 700;
    text-decoration: underline;
    color: var(--color-neutral-900);
}

.job-dropdown__caret {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    color: var(--color-neutral-900);
}

.jobs-sort .dropdown-menu,
.page-size .dropdown-menu {
    font-family: var(--font-base);
    font-size: 14px;
    border-color: var(--color-neutral-200);
}

.jobs-sort .dropdown-item.active,
.jobs-sort .dropdown-item:active,
.page-size .dropdown-item.active,
.page-size .dropdown-item:active {
    background-color: var(--color-primary);
}

.view-toggle {
    display: inline-flex;
    align-items: center;
    overflow: hidden;
}

.view-toggle__btn {
    width: 48px;
    height: 48px;
    padding: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background-color: var(--color-neutral-100);
    color: var(--color-neutral-500);
    cursor: pointer;
    transition: background-color .15s, color .15s;
}

.view-toggle__btn.is-active {
    background-color: var(--color-primary-50);
    color: var(--color-primary);
}

.view-toggle__btn svg {
    width: 24px;
    height: 24px;
}

/* Job card component styles live in job-cards.css */

/* ==========================================================================
   Pagination
   ========================================================================== */
.pagination-bar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    /* gap: 8px; */
    width: 100%;
    padding: 24px 0;
}

/* Desktop: page numbers stay centered with the job list; the page-size
   selector floats to the left edge so it doesn't shift the center. */
@media (min-width: 992px) {
    .pagination-bar .page-size {
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-45%);
    }
}

/* Mobile: keep the page buttons on a single row and move the page-size
   selector onto its own centered row underneath. */
@media (max-width: 991px) {
    .pagination-bar .page-size {
        order: 2;
        flex: 0 0 100%;
        display: flex;
        justify-content: center;
        margin-top: 12px;
    }
}

@media (max-width: 575px) {
    .pagination-bar {
        gap: 4px;
    }
    .pagination-bar .page-btn {
        width: 34px;
    }
    .pagination-bar .page-btn--arrow {
        padding: 8px;
    }
}

.page-btn {
    width: 42px;
    height: 34px;
    padding: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 4px;
    background-color: transparent;
    color: var(--color-neutral-500);
    font-family: var(--font-base);
    font-weight: 500;
    font-size: 16px;
    line-height: 1.1;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s, color .15s;
}

.page-btn:hover {
    color: var(--color-primary);
}

.page-btn.is-active {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.page-btn--arrow {
    color: var(--color-neutral-700);
    padding: 12px;
}

.page-btn[disabled] {
    opacity: .4;
    cursor: not-allowed;
}

.page-btn svg { width: 24px; height: 24px; }

/* ==========================================================================
   Filter — drawer on mobile, static sidebar on desktop
   ========================================================================== */
/* Mobile: open the drawer from the job list head */
.jobs-filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
    height: 44px;
    padding: 0 16px;
    border: 1px solid var(--color-primary);
    border-radius: 2px;
    background-color: var(--color-white);
    color: var(--color-primary);
    font-family: var(--font-base);
    font-weight: 500;
    font-size: 16px;
    line-height: 1.2;
    cursor: pointer;
}

.jobs-filter-toggle:hover { background-color: var(--color-primary-25, #f3f8fc); }
.jobs-filter-toggle svg { flex: 0 0 auto; }

.careers-filter {
    position: fixed;
    inset: 0;
    z-index: 1080;
    display: flex;
    justify-content: flex-start;
    visibility: hidden;
    pointer-events: none;
}

.careers-filter.is-open {
    visibility: visible;
    pointer-events: auto;
}

.careers-filter__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 24, 39, 0.5);
    backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity .25s ease;
}

.careers-filter.is-open .careers-filter__backdrop { opacity: 1; }

.careers-filter__panel {
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(420px, 100%);
    max-width: 100%;
    height: 100%;
    background: #fff;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transform: translateX(-100%);
    transition: transform .25s ease;
}

.careers-filter.is-open .careers-filter__panel { transform: translateX(0); }

.careers-filter__header {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
}

.careers-filter__title {
    margin: 0;
    font-family: var(--font-base);
    color: var(--color-neutral-900);
}

/* Mobile drawer header keeps its compact size; on desktop the heading reuses
   the .careers__title style (the element carries both classes). */
@media (max-width: 991px) {
    .careers-filter__title {
        font-weight: 700;
        font-size: 20px;
        line-height: 30px;
    }
}

.careers-filter__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--color-neutral-900);
    cursor: pointer;
    border-radius: 4px;
}

.careers-filter__close:hover { background: var(--color-neutral-100); }

.careers-filter__body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 0 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.careers-filter__actions {
    position: sticky;
    top: 0;
    z-index: 5;
    align-self: stretch;
    margin: 0 -24px;
    padding: 0 24px 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #fff;
}

.careers-filter__apply,
.careers-filter__reset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 28px;
    font: inherit;
    font-weight: 600;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: border-color 0.15s ease, opacity 0.15s ease, background-color 0.15s ease;
}

.careers-filter__apply {
    background: var(--color-primary);
    color: #fff;
    border: 1px solid var(--color-primary);
}

.careers-filter__apply:hover {
    background: #003f78;
    border-color: #003f78;
}

.careers-filter__reset {
    background: #fff;
    color: #df1c41;
    border: 1px solid transparent;
}

.careers-filter__reset:hover {
    border-color: #df1c41;
}

.careers-filter__reset:disabled {
    color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.7;
    box-shadow: none;
}

.careers-filter__reset:disabled:hover {
    border-color: transparent;
}

/* Body scroll lock while the drawer is open */
body.careers-filter-open { overflow: hidden; }

/* ==========================================================================
   Careers â€” responsive
   ========================================================================== */
@media (min-width: 992px) {
    .careers { padding: 80px; }

    /* Sidebar width for the static filter column */
    .careers__container { --filter-w: clamp(280px, 26vw, 340px); }

    .careers__layout {
        flex-direction: row;
        align-items: stretch;
        gap: 56px;
    }

    /* Mobile-only drawer trigger */
    .jobs-filter-toggle { display: none; }

    /* Filter becomes a static left-column sidebar (DOM order puts it first) */
    .careers-filter {
        position: static;
        z-index: auto;
        display: block;
        flex: 0 0 var(--filter-w);
        width: var(--filter-w);
        visibility: visible;
        pointer-events: auto;
    }

    .careers-filter__backdrop,
    .careers-filter__close { display: none; }

    .careers-filter__panel {
        position: static;
        width: 100%;
        height: 100%;
        max-width: none;
        transform: none;
        overflow: visible;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        background: transparent;
    }

    /* Bare sidebar: drop the card chrome insets so content aligns to the column */
    .careers-filter__header { padding: 0 0 16px; }

    /* Sticky filter body: sticks while scrolling, bounded by .careers__container.
       Offset by the pinned job-filter's height so the two stickies don't overlap. */
    .careers-filter__body {
        padding: 0;
        position: sticky;
        top: calc(var(--job-filter-pinned-h, 0px) + 16px);
        max-height: calc(100vh - var(--job-filter-pinned-h, 0px) - 32px);
        overflow-y: auto;
    }

    .careers-filter__actions {
        margin: 0;
        padding: 0 0 12px;
        background: #FBFBFB;
    }

    /* Drawer scroll-lock never applies on desktop */
    body.careers-filter-open { overflow: visible; }
}

/* ==========================================================================
   Recruitment process
   ========================================================================== */
.process-section {
    background-color: var(--color-neutral-50);
    padding-block: 48px;
}

.process-section__container {
    width: min(100% - 32px, 1340px);
    margin-inline: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.process-section__header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
}

.process-section__title {
    margin: 0;
    max-width: 900px;
    font-weight: 600;
    font-size: clamp(32px, 5vw, 64px);
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: var(--color-text-strong);
}

.process-section__subtitle {
    margin: 0;
    max-width: 800px;
    font-weight: 500;
    font-size: 18px;
    line-height: 1.5;
    letter-spacing: -0.36px;
    color: var(--color-text-sub);
}

.process {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 24px;
}

.process-step {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    padding: 24px;
    text-align: center;
}

.process-step__icon {
    flex: 0 0 auto;
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: var(--color-primary);
    color: var(--color-white);
}

.process-step__icon svg {
    width: 32px;
    height: 32px;
}

.process-step__info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 268px;
}

.process-step__title {
    margin: 0;
    font-weight: 700;
    font-size: 17px;
    line-height: 1.5;
    color: var(--color-neutral-900);
}

.process-step__desc {
    margin: 0;
    font-weight: 400;
    font-size: 15px;
    line-height: 1.5;
    color: var(--color-neutral-500);
}

.process-step::after {
    content: "";
    display: none;
    position: absolute;
    top: 40px;
    left: calc(50% + 50px);
    width: calc(100% - 95px);
    height: 56px;
    transform: translateY(-50%);
    background: url("../assets/images/careers/hiring-arrows.png") no-repeat center center / contain;
    pointer-events: none;
}

@media (min-width: 768px) {
    .process {
        grid-template-columns: repeat(2, minmax(0, 320px));
        gap: 32px;
        justify-content: center;
    }
}

@media (min-width: 992px) {
    .process-section { padding-block: 80px; }
    .process-section__container { gap: 64px; }

    .process {
        display: flex;
        flex-wrap: nowrap;
        justify-content: center;
        align-items: flex-start;
        gap: 0;
    }

    .process-step {
        flex: 1 1 0;
        min-width: 0;
    }

    .process-step:not(:last-child)::after {
        display: block;
    }

    .process-step:nth-child(even):not(:last-child)::after {
        transform: translateY(-50%) scaleY(-1);
        top: 95px;
    }
}

/* "No fees" banner styles live in legit-section.css */

/* ==========================================================================
   Filter controls (shared by the sidebar / drawer panel)
   Container styles live in the "Filter — drawer / sidebar" section above.
   ========================================================================== */
.filter-btn {
    flex: 1 1 0;
    min-width: 0;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 16px;
    border-radius: 2px;
    font-family: var(--font-base);
    font-weight: 500;
    font-size: 18px;
    line-height: 26px;
    cursor: pointer;
    border: 1px solid transparent;
    white-space: nowrap;
}

.filter-btn--ghost {
    background: #fff;
    border-color: var(--color-primary);
    color: var(--color-primary);
}
.filter-btn--ghost:hover { background: var(--color-primary-25); }

.filter-btn--primary {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}
.filter-btn--primary:hover { filter: brightness(0.95); }

/* Section / collapsible group */
.filter-group { width: 100%; }

.filter-group__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    padding: 0 0 16px;
    background: transparent;
    border: 0;
    cursor: pointer;
    text-align: left;
}

.filter-group__title {
    flex: 1 1 auto;
    font-family: var(--font-base);
    font-weight: 600;
    font-size: 16px;
    color: var(--color-neutral-900);
    text-decoration: underline;
    text-underline-position: from-font;
}

.filter-group__chevron {
    flex: 0 0 auto;
    color: var(--color-primary);
    transition: transform 0.2s ease;
}

.filter-group[data-collapsed] .filter-group__chevron { transform: rotate(180deg); }
.filter-group[data-collapsed] .filter-group__head { padding-bottom: 0; }
.filter-group[data-collapsed] .filter-group__body { display: none; }

.filter-group__body {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Checkbox row */
.filter-check {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
}

.filter-check input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.filter-check__box {
    flex: 0 0 auto;
    position: relative;
    width: 24px;
    height: 24px;
    border: 2px solid var(--color-neutral-200);
    border-radius: 4px;
    background: #fff;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.filter-check input:checked + .filter-check__box {
    background: var(--color-primary);
    border-color: var(--color-primary);
}

.filter-check input:checked + .filter-check__box::after {
    content: "";
    position: absolute;
    left: 8px;
    top: 3px;
    width: 5px;
    height: 11px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.filter-check input:focus-visible + .filter-check__box {
    outline: 2px solid var(--color-primary-400);
    outline-offset: 2px;
}

.filter-check__label {
    flex: 1 1 auto;
    font-family: var(--font-base);
    font-weight: 500;
    font-size: 16px;
    line-height: 26px;
    color: var(--color-neutral-900);
}

/* Tag chips (Cáº¥p báº­c) */
.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.filter-tag {
    padding: 4px 8px;
    border: 0;
    border-radius: 6px;
    background: var(--color-neutral-100);
    color: var(--color-neutral-900);
    font-family: var(--font-base);
    font-weight: 500;
    font-size: 16px;
    line-height: 26px;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.filter-tag:hover { background: #e5e7eb; }

.filter-tag.is-active {
    background: var(--color-primary);
    color: #fff;
}

/* Native select wrapper */
.filter-select {
    position: relative;
    width: 100%;
}

.filter-select select {
    width: 100%;
    height: 48px;
    padding: 11px 40px 11px 14px;
    border: 1px solid var(--color-neutral-200);
    border-radius: 4px;
    background: #fff;
    color: var(--color-neutral-900);
    font-family: var(--font-base);
    font-weight: 500;
    font-size: 16px;
    line-height: 26px;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    box-shadow: inset 0 1px 2px rgba(10, 13, 18, 0.05);
}

.filter-select select:invalid,
.filter-select select option[value=""] { color: var(--color-neutral-500); }

.filter-select__chevron {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    color: var(--color-neutral-500);
    pointer-events: none;
}
