/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    --hero-h: 240px;
    position: relative;
    width: 100%;
    background: #FBFBFB;
}

.hero__media {
    position: relative;
    width: 100%;
    height: var(--hero-h);
}

.hero__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: var(--hero-h);
    background: linear-gradient(180deg, rgba(15, 28, 63, 0.43) 0%, rgba(13, 72, 161, 0.30) 100%);
    pointer-events: none;
}

.hero__content {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 24px 16px 32px;
    background-color: var(--color-primary);
}

.hero__content > .hero__intro,
.hero__content > .job-filter {
    width: 100%;
    max-width: 1216px;
}

.hero__intro {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.hero__title {
    margin: 0;
    font-weight: 500;
    font-size: clamp(26px, 6vw, 50px);
    line-height: 1.2;
    letter-spacing: -0.034em;
    color: var(--color-white);
    text-align: center;
}

.hero__subtitle {
    margin: 0;
    font-weight: 500;
    font-size: clamp(15px, 2.2vw, 24px);
    line-height: 1.4;
    color: var(--color-white);
    text-align: center;
    opacity: 0.9;
}

/* ==========================================================================
   Job filter card
   ========================================================================== */
.job-filter {
    --filter-btn-w: 172px;
    width: 100%;
    background-color: var(--color-bg, #fbfbfb);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    border-radius: 0;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
}

.job-filter__fields {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.job-filter__search-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
}

.job-filter__search {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 48px;
    padding: 0 12px;
    border: 1px solid var(--color-neutral-200, #e5e7eb);
    border-radius: 2px;
    background-color: var(--color-white);
}

.job-filter__search:focus-within {
    border-color: var(--color-primary);
}

.job-filter__search-icon {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    color: #6b7280;
}

.job-filter__search-input {
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    font-family: var(--font-base);
    font-weight: 500;
    font-size: 16px;
    color: #111827;
    text-overflow: ellipsis;
}

.job-filter__search-input::placeholder {
    color: #6b7280;
    text-overflow: ellipsis;
    overflow: hidden;
}

.job-filter__search-btn {
    flex: 0 0 auto;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 24px;
    border: 0;
    border-radius: 2px;
    background-color: var(--color-primary);
    color: var(--color-white);
    font-family: var(--font-base);
    font-weight: 500;
    font-size: 18px;
    line-height: 26px;
    cursor: pointer;
    white-space: nowrap;
}

.job-filter__search-btn:hover {
    background-color: #0d4886;
}

.job-filter__filter-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.job-filter__dropdowns {
    flex: 1 1 100%;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.job-filter__dropdowns .dropdown {
    width: 100%;
}

.job-filter__popular {
    margin: 0;
    font-family: var(--font-base);
    font-weight: 500;
    font-size: 16px;
    line-height: 26px;
    color: var(--color-neutral-700, #374151);
}

.job-filter__popular-label {
    color: #6b7280;
}

.job-filter__popular-link {
    color: var(--color-neutral-700, #374151);
    font-weight: 600;
    text-decoration: underline;
}

.job-filter__popular-link:hover {
    color: var(--color-primary);
}

.job-filter__dropdowns .dropdown-toggle {
    width: 100%;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0 12px;
    border: 1px solid var(--color-neutral-200, #e5e7eb);
    border-radius: 2px;
    background-color: var(--color-white);
    color: #111827;
    font-family: var(--font-base);
    font-weight: 500;
    font-size: 16px;
    text-align: left;
}

.job-filter__dropdowns .dropdown-toggle:hover,
.job-filter__dropdowns .dropdown-toggle:focus {
    border-color: var(--color-primary);
    background-color: var(--color-white);
    color: #111827;
    box-shadow: none;
}

.job-filter__dropdowns .dropdown-toggle::after {
    content: "";
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    margin-left: auto;
    border: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M5 7.5l5 5 5-5' stroke='%236b7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / 20px 20px;
    transition: transform .15s ease;
}

.job-filter__dropdowns .dropdown-toggle[aria-expanded="true"]::after {
    transform: rotate(180deg);
}

.job-filter__dropdowns .dropdown-menu {
    width: 100%;
    border-color: var(--color-neutral-200, #e5e7eb);
    border-radius: 2px;
    font-family: var(--font-base);
    font-size: 15px;
}

.job-filter__dropdowns .dropdown-item.active,
.job-filter__dropdowns .dropdown-item:active {
    background-color: var(--color-primary);
}

/* ==========================================================================
   Sticky job-filter (pinned to top on scroll, set by careers.js)
   ========================================================================== */
.job-filter.is-pinned {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 90;
    width: 100%;
    max-width: 100%;
    margin: 0;
    border-radius: 0;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.14);
    padding-left: max(16px, calc((100% - 1216px) / 2));
    padding-right: max(16px, calc((100% - 1216px) / 2));
}

.job-filter.is-pinned .job-filter__popular { display: none; }

/* When the filter is pinned and popular row hides, pull the next section up
   by the same amount so the visible gap below the pinned bar stays constant
   (prevents a one-frame "jump" at the moment of pinning). */
body.job-filter-pinned .careers {
    margin-top: calc(var(--job-filter-popular-h, 0px) * -1);
}

/* ==========================================================================
   Hero — responsive
   ========================================================================== */
@media (min-width: 576px) {
    .hero { --hero-h: 300px; }
}

@media (min-width: 768px) {
    .hero {
        --hero-h: 520px;
        padding-bottom: 70px;
    }

    .hero__content {
        position: absolute;
        left: 50%;
        bottom: 0;
        transform: translateX(-50%);
        width: min(100% - 64px, 1216px);
        gap: 24px;
        padding: 0;
        background-color: transparent;
    }

    .hero__intro { gap: 16px; }

    .job-filter { padding: 24px; gap: 20px; }

    .job-filter__search-btn { flex: 0 0 var(--filter-btn-w); }

    .job-filter__search-row,
    .job-filter__filter-row { flex-wrap: nowrap; gap: 16px; }

    .job-filter__dropdowns {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
    }
}

@media (min-width: 992px) {
    .hero { --hero-h: 600px; }
}

@media (min-width: 1200px) {
    .hero { --hero-h: 660px; }
}

@media (min-width: 1400px) {
    .hero { --hero-h: 66.67vh; }
}
