/*
 * Careers page (blocks/careers-hero, perks, openings, digs, careers-demo, queries).
 * Shared look: lavender panels, white cards, Get started closer, as the other pages.
 * Every section sits in the 1440 frame (base.css --rm-container); content is at most
 * --rm-content wide and centred, panels span the frame minus the gutter.
 */
.rm-careers-hero,
.rm-careers-perks,
.rm-careers-openings,
.rm-careers-gallery,
.rm-careers-digs,
.rm-careers-queries {
    position: relative;
    width: 100%;
    max-width: var(--rm-container);
    margin: 0 auto;
    padding-right: var(--rm-gutter);
    padding-left: var(--rm-gutter);
    overflow-x: clip;
}

/* == hero == */
.rm-careers-hero__inner {
    display: flex;
    gap: 20px;
    padding: 50px 0;
}

.rm-careers-hero__copy,
.rm-careers-hero__media {
    flex: 1 1 0;
    min-width: 0;
}

.rm-careers-hero__copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
    padding: 10px 0;
}

.rm-careers-hero__title {
    margin: 0;
    color: var(--rm-black);
    font-family: var(--rm-font);
    font-size: var(--rm-type-h60);
    font-weight: 500;
    line-height: 1.05;
}

.rm-careers-hero__text {
    color: var(--rm-grey);
    font-size: var(--rm-type-20l);
    font-weight: 300;
    line-height: 1.5;
}

.rm-careers-hero__text p {
    margin: 0;
}

.rm-careers-hero__buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.rm-careers-hero__media {
    display: flex;
    align-items: center;
    padding: 10px;
}

.rm-careers-hero__image {
    display: block;
    width: 100%;
    max-width: 800px;
    height: auto;
    border-radius: 30px;
}

/* == perks == */
.rm-careers-perks {
    padding-block: 10px;
}

.rm-careers-perks__panel,
.rm-careers-digs__panel,
.rm-careers-queries__panel {
    margin: 0;
    padding-right: max(20px, calc((100% - var(--rm-content)) / 2));
    padding-left: max(20px, calc((100% - var(--rm-content)) / 2));
}

.rm-careers-perks__panel {
    display: flex;
    align-items: center;
    gap: 40px;
}

.rm-careers-perks__offer {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
    padding: 10px;
}

.rm-careers-perks__title {
    margin: 0;
    color: var(--rm-black);
    font-family: var(--rm-font);
    font-size: var(--rm-type-40);
    font-weight: 400;
    line-height: 1.05;
}

.rm-careers-perks__text {
    color: var(--rm-black);
    font-size: var(--rm-type-20l);
    font-weight: 300;
    line-height: 1.5;
}

.rm-careers-perks__cards.rm-contact-items--perks {
    --rm-ci-icon: 32px;
    --rm-ci-icon-pad: 0px;
    --rm-ci-icon-color: var(--rm-blurple);
    --rm-ci-color: var(--rm-black);
    display: grid;
    flex: 1 1 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    min-width: 0;
    font-family: var(--rm-font);
    font-size: var(--rm-type-18l);
    font-weight: 400;
    line-height: 1.3;
}

.rm-careers-perks__cards .rm-contact-item {
    display: flex;
    margin: 0;
    border-radius: 25px;
    background: var(--rm-white);
}

.rm-careers-perks__cards .rm-contact-item__row {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    width: 100%;
    padding: 24px;
}

.rm-careers-perks__cards .rm-contact-item__icon svg {
    margin: 0;
}

.rm-careers-perks__cards .rm-contact-item__label {
    padding-left: 0;
}

/* == openings == */
.rm-careers-openings {
    padding-block: 50px;
    background: #fff;
}

.rm-careers-openings__title {
    margin: 0 0 30px;
    color: var(--rm-black);
    font-family: var(--rm-font);
    font-size: var(--rm-type-45);
    font-weight: 500;
    line-height: 1.05;
}

.rm-job-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rm-job-card {
    display: flex;
}

.rm-job-card__link {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 30px;
    border: 1px solid var(--rm-grey-medium);
    border-radius: 30px;
    background: #fff;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .08);
    color: var(--rm-black);
    text-decoration: none;
}

.rm-job-card__link:hover,
.rm-job-card__link:focus-visible {
    border-color: var(--rm-blurple-medium);
}

.rm-job-card__title {
    margin: 0;
    font-family: var(--rm-font);
    font-size: var(--rm-type-28);
    font-weight: 500;
    line-height: 1.15;
}

.rm-job-card__summary {
    margin: 0;
    color: var(--rm-grey);
    font-size: var(--rm-type-16l);
    font-weight: 300;
    line-height: 1.5;
}

.rm-job-card__cta {
    margin-top: auto;
    color: var(--rm-blurple);
    font-family: var(--rm-font-helvetica);
    font-size: 16px;
    font-weight: 500;
}

.rm-job-card__cta::after {
    content: " \2192";
}

.rm-job-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rm-job-meta__chip {
    padding: 6px 12px;
    border-radius: 20px;
    background: var(--rm-lavender);
    color: var(--rm-black);
    font-family: var(--rm-font-helvetica);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.2;
}

.rm-job-empty {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 40px 30px;
    border-radius: 30px;
    background: var(--rm-lavender);
}

.rm-job-empty__title {
    margin: 0;
    font-family: var(--rm-font);
    font-size: var(--rm-type-28);
    font-weight: 500;
    line-height: 1.15;
}

.rm-job-empty__text {
    margin: 0;
    max-width: 640px;
    color: var(--rm-grey);
    font-size: var(--rm-type-18l);
    font-weight: 300;
    line-height: 1.5;
}

.rm-job-empty__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 6px;
}

@media (min-width: 768px) {
    .rm-job-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1025px) {
    .rm-job-cards {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* == gallery == */
.rm-careers-gallery {
    padding-block: 20px 50px;
    background: #fff;
}

.rm-gallery {
    display: grid;
    grid-auto-flow: dense;
    grid-auto-rows: 120px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.rm-gallery__item {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 30px;
}

.rm-gallery__item:first-child {
    grid-column: span 2;
    grid-row: span 2;
}

.rm-gallery__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .8s;
}

.rm-gallery__item:hover .rm-gallery__image,
.rm-gallery__item:focus-visible .rm-gallery__image {
    transform: scale(1.06);
}

@media (min-width: 768px) {
    .rm-gallery {
        grid-auto-rows: 150px;
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .rm-gallery__item:nth-child(n+6) {
        grid-column: span 2;
    }
}

@media (min-width: 1025px) {
    .rm-gallery {
        grid-auto-rows: 260px;
        gap: 20px;
    }
}

/* Gallery lightbox (careers.js) */
.rm-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .9);
}

.rm-lightbox:focus {
    outline: none;
}

.rm-lightbox[hidden] {
    display: none;
}

.rm-lightbox__image {
    max-width: calc(100% - 120px);
    max-height: calc(100% - 120px);
    object-fit: contain;
}

.rm-lightbox__button {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    padding: 0;
    border: 0;
    background: transparent;
    color: rgba(238, 238, 238, .9);
    font-size: 36px;
    line-height: 1;
    cursor: pointer;
}

.rm-lightbox__button:hover,
.rm-lightbox__button:focus-visible {
    color: #fff;
}

.rm-lightbox__close {
    top: 10px;
    right: 10px;
}

.rm-lightbox__prev {
    top: 50%;
    left: 10px;
    transform: translateY(-50%);
}

.rm-lightbox__next {
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
}

.rm-lightbox__count {
    position: absolute;
    top: 22px;
    left: 20px;
    color: rgba(238, 238, 238, .9);
    font-size: 14px;
}


/* == digs == */
.rm-careers-digs {
    padding-block: 10px;
}

.rm-careers-digs__inner {
    display: flex;
    align-items: center;
    gap: 40px;
}

.rm-careers-digs__copy,
.rm-careers-digs__media {
    flex: 1 1 0;
    min-width: 0;
}

.rm-careers-digs__copy {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 10px;
}

.rm-careers-digs__title {
    margin: 0;
    color: var(--rm-blurple);
    font-family: var(--rm-font);
    font-size: var(--rm-type-40);
    font-weight: 400;
    line-height: 1.05;
}

.rm-careers-digs__text {
    color: var(--rm-black);
    font-size: var(--rm-type-20l);
    font-weight: 300;
    line-height: 1.5;
}

.rm-careers-digs__text p {
    margin: 0 0 1em;
}

.rm-careers-digs__text p:last-child {
    margin-bottom: 0;
}

.rm-careers-digs__image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 30px;
}

/* == queries == */
.rm-careers-queries {
    padding-block: 30px 60px;
}

.rm-careers-queries__title {
    margin: 0 0 30px;
    color: var(--rm-black);
    font-family: var(--rm-font);
    font-size: var(--rm-type-40);
    font-weight: 400;
    line-height: 1.05;
    text-align: center;
}

.rm-careers-queries__panel {
    display: flex;
    justify-content: center;
}

.rm-careers-queries__card {
    width: 100%;
    max-width: var(--rm-content);
    min-width: 0;
    padding: 40px;
    border-radius: 40px;
    background: var(--rm-white);
}

.rm-careers-queries__card .rm-form {
    margin-bottom: 14px;
}

@media (max-width: 1024px) {
    .rm-careers-hero__inner {
        flex-direction: column-reverse;
    }

    .rm-careers-hero__copy,
    .rm-careers-hero__media {
        flex: none;
    }

    .rm-careers-perks__panel {
        flex-direction: column;
        align-items: stretch;
    }

    .rm-careers-digs__inner {
        flex-direction: column;
        align-items: stretch;
    }

    .rm-careers-digs__copy,
    .rm-careers-digs__media {
        flex: none;
    }
}

@media (max-width: 767px) {
    .rm-careers-hero__media {
        padding: 0;
    }

    .rm-careers-perks__panel {
        padding: 40px 10px;
        border-radius: 30px;
    }

    .rm-careers-perks__cards.rm-contact-items--perks {
        grid-template-columns: 1fr;
    }

    .rm-careers-digs__panel {
        padding: 40px 10px;
        border-radius: 30px;
    }

    .rm-careers-queries__panel {
        padding: 40px 10px;
        border-radius: 30px;
    }

    .rm-careers-queries__card {
        padding: 20px;
        border-radius: 30px;
    }

    .rm-careers-queries__card .rm-form {
        margin-bottom: 12px;
    }
}

/* mediaPosition (parts/media.php): media first in the source; stacked (≤1024) it stays on top */
.rm-careers-hero__inner.rm-media--left,
.rm-careers-digs__inner.rm-media--left {
    flex-direction: row;
}

.rm-careers-hero__inner.rm-media--right,
.rm-careers-digs__inner.rm-media--right {
    flex-direction: row-reverse;
}

@media (max-width: 1024px) {
    .rm-careers-hero__inner.rm-media--left,
    .rm-careers-hero__inner.rm-media--right,
    .rm-careers-digs__inner.rm-media--left,
    .rm-careers-digs__inner.rm-media--right {
        flex-direction: column;
    }
}
