.page-header__wrapper {
    display: flex;
    justify-content: space-between;
}

.page-header__wrapper > p {
    max-width: 448px;
    font-size: clamp(1.5rem, 1.3713rem + 0.5597vw, 1.875rem);
}

.careers-content {
    padding-block: 4rem;
    background-color: #fff;
}

.careers-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 900px) {
    .careers-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .page-header__wrapper {
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }

    .careers-grid { grid-template-columns: 1fr; }
    
}

.careers-grid__empty {
    grid-column: 1 / -1;
    text-align: center;
}

/* Cards */

.careers-card {
    position: relative;
    aspect-ratio: 1 / 0.85;
    background-color: #2b2a6b;
    background-size: cover;
    background-position: center;
    overflow: hidden;
    border-radius: 5px;
    border: 1px solid #2D337F;
}

.careers-card:hover {
    border: 1px solid #2D337F;
}

/* Purple overlay on image cards so title stays readable */
.careers-card.has-image::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(43, 42, 107, 0.55), rgba(31, 31, 86, 0.85));
    transition: opacity 0.3s ease;
    z-index: 1;
}

.careers-card.has-image:hover::before {
    opacity: 0;
}

.careers-card__link {
    position: relative;
    z-index: 2;
    display: block;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.careers-card__arrow {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 3;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.25s ease;
}

.careers-card:hover .careers-card__arrow {
    opacity: 0;
}

/* Default state */

.careers-card__default {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 28px;
    color: #fff;
    transition: opacity 0.25s ease;
}

.careers-card:hover .careers-card__default {
    opacity: 0;
}

.careers-card__title {
    margin: 0 0 8px;
    font-size: 28px;
    line-height: 1.15;
    font-weight: 700;
    color: #fff;
}

.careers-card__meta {
    margin: 0;
    font-style: italic;
    font-size: 15px;
    opacity: 0.9;
}

/* Hover state (white panel) */

.careers-card__hover {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 28px;
    background: #fff;
    color: #1f1f56;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.careers-card:hover .careers-card__hover {
    opacity: 1;
    visibility: visible;
}

.careers-card__hover .careers-card__title {
    color: #1f1f56;
    font-size: 26px;
    margin: 0;
}

.careers-card__excerpt {
    font-size: 15px;
    line-height: 1.55;
    color: #3c3c5c;
    margin-top: 16px;
    flex: 1;
    overflow: scroll;
}

.careers-card__excerpt p {
    margin: 0 0 12px;
}

.careers-card__cta {
    align-self: flex-end;
    display: inline-block;
    padding: 12px 28px;
    border: 1px solid #2b2a6b;
    border-radius: 7px;
    color: #2b2a6b;
    font-size: 18px;
    text-transform: uppercase;
    font-weight: 600;
    margin-top: 16px;
	text-decoration: none;
}

/* Touch devices: skip hover state, default stays visible
@media (hover: none) {
    .careers-card__hover { display: none; }
    .careers-card:focus-within .careers-card__default { opacity: 1; }
    .careers-card:focus-within .careers-card__arrow { opacity: 1; }
}

*/

.careers-filters {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 48px;
}

.careers-filters__count {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #1f1f56;
}

.careers-filters__controls {
    display: flex;
    gap: 16px;
}

.careers-filters select {
    appearance: none;
    -webkit-appearance: none;
    min-width: 220px;
    padding: 14px 48px 14px 24px;
    background-color: transparent;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' stroke='%231f1f56' stroke-width='1.5' fill='none'/></svg>");
    background-repeat: no-repeat;
    background-position: right 20px center;
    background-size: 12px 8px;
    border: 1px solid #1f1f56;
    border-radius: 4px;
    color: #1f1f56;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    cursor: pointer;
}

.careers-filters select:hover {
    background-color: rgba(31, 31, 86, 0.05);
}

.careers-filters select:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(31, 31, 86, 0.2);
}

@media (max-width: 600px) {
    .careers-filters { flex-direction: column; align-items: stretch; }
    .careers-filters__controls { flex-direction: column; }
    .careers-filters select { width: 100%; }
}

.careers-more {
    display: flex;
    justify-content: flex-end;
    margin-top: 65px;
}

.careers-more__btn {
    padding: 14px 48px;
    background: transparent;
    border: 1px solid #1f1f56;
    border-radius: 4px;
    color: #1f1f56;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 15%;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.careers-more__btn:hover:not(:disabled) {
    background: #1f1f56;
    color: #fff;
}

.careers-more__btn:disabled {
    opacity: 0.6;
    cursor: wait;
}

.btn.ninja-forms-field.nf-element.btn-success.nf-fu-fileinput-button {
	background-color: #A7C698;
	color: #2E337A;
}

.nf-fu-progress {
	display: none !important;
}