/* ===================================================================
   Careers page. Prefix map: cr-hero | cr-why | cr-jobs | cr-apply
   Depends on style.css for :root tokens, .container and the nav.
   =================================================================== */
:root {
    --cr-ink: #22160F;
    --cr-body: #5C4642;
    --cr-muted: #8A6F69;
    --cr-line: #F1DDD7;
    --cr-brand: #8E1B2E;
    --cr-radius: 22px;
    --cr-shadow: 0 22px 48px -26px rgba(96, 40, 38, .34);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ------------------------------ buttons ------------------------------ */
.cr-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 999px;
    font-family: var(--font-heading);
    font-size: .94rem;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform .35s cubic-bezier(.22, .68, .3, 1), box-shadow .35s ease, background .35s ease, color .35s ease;
}

.cr-btn-primary {
    background: linear-gradient(120deg, #A32236 0%, #8E1B2E 100%);
    color: #fff;
    box-shadow: 0 16px 34px -16px rgba(192, 48, 60, .9);
}

.cr-btn-primary:hover { transform: translateY(-3px); box-shadow: 0 22px 42px -16px rgba(192, 48, 60, .95); }

.cr-btn-ghost {
    background: rgba(255, 255, 255, .07);
    border-color: rgba(255, 205, 198, .34);
    color: #FBE7E2;
}

.cr-btn-ghost:hover { background: rgba(255, 255, 255, .14); transform: translateY(-3px); }

.cr-btn-wa {
    background: #fff;
    border-color: #CFE9D8;
    color: var(--adv-wa-deep);
}

.cr-btn-wa:hover { transform: translateY(-3px); background: #F3FBF6; }

/* ------------------------------ hero ------------------------------ */
.cr-hero {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    padding: clamp(128px, 12vw, 156px) 0 clamp(56px, 6vw, 84px);
    /* The band grows with the viewport, so a wide screen throws away less of
       a photo that is only 2.5 times as wide as it is tall. */
    min-height: clamp(460px, 30vw, 640px);
    background: linear-gradient(180deg, #43121D 0%, #66202E 52%, #45131E 100%);
    color: #fff;
}

/* The photo is composed for exactly this layout — the ward runs off to the
   right and the left third is near-empty light — so it carries at full
   strength and the copy sits in the space the picture already leaves. */
.cr-hero-photo {
    position: absolute;
    inset: 0;
    z-index: -2;
    /* Anchored near the top, not centred: the frame is always wider than the
       photo is proportionally tall, so something gets cropped — and it has to
       be the empty floor at the bottom rather than the nurse's head. */
    background: url('../images/image%20copy%2039.png') 72% 6% / cover no-repeat;
}

/* Maroon only where the words are. It fades out well before the nurse, so
   the right-hand half of the photo is seen rather than tinted. */
.cr-hero-veil {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(96deg,
            rgba(46, 13, 21, .95) 0%,
            rgba(58, 17, 26, .88) 34%,
            rgba(70, 21, 32, .55) 56%,
            rgba(70, 21, 32, .12) 72%,
            transparent 84%),
        linear-gradient(180deg, rgba(46, 13, 21, .3) 0%, transparent 34%);
}

.cr-hero-inner {
    position: relative;
    width: min(760px, 92vw);
}

.cr-badge {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 8px 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 205, 198, .28);
    font-family: var(--font-heading);
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: #F6CDC6;
}

.cr-badge i { color: #CE7B34; }

.cr-hero h1 {
    font-size: clamp(2.2rem, 4.8vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -.03em;
    margin: 18px 0 16px;
    max-width: 16ch;
    text-wrap: balance;
}

.cr-hero h1 em {
    font-style: normal;
    background: linear-gradient(100deg, #F6C9C2 0%, #CE7B34 60%, #EFB6A6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.cr-hero-sub {
    max-width: 62ch;
    font-size: clamp(1rem, 1.2vw, 1.08rem);
    line-height: 1.8;
    color: rgba(250, 226, 221, .8);
    margin: 0;
}

.cr-hero-acts { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

/* ------------------------------ shared heading ------------------------------ */
.cr-head { max-width: 64ch; margin-bottom: clamp(30px, 4vw, 46px); }

.cr-eyebrow {
    display: inline-block;
    padding: 6px 15px;
    border-radius: 999px;
    background: #FDF3EF;
    border: 1px solid var(--cr-line);
    color: var(--cr-brand);
    font-family: var(--font-heading);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.cr-head h2 {
    font-size: clamp(1.7rem, 3.1vw, 2.4rem);
    font-weight: 800;
    letter-spacing: -.025em;
    line-height: 1.16;
    color: var(--cr-ink);
    margin: 16px 0 12px;
    text-wrap: balance;
}

.cr-head p { font-size: 1.02rem; line-height: 1.8; color: var(--cr-body); margin: 0; }

/* ------------------------------ why us ------------------------------ */
.cr-why { padding: clamp(56px, 7vw, 92px) 0; background: #fff; }

.cr-why-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(18px, 2.2vw, 26px);
}

.cr-why-card {
    position: relative;
    overflow: hidden;
    padding: 30px 26px 28px;
    border-radius: var(--cr-radius);
    background: linear-gradient(180deg, #FFFFFF 0%, #FFFBF9 100%);
    border: 1px solid var(--cr-line);
    transition: transform .42s cubic-bezier(.22, .68, .3, 1), box-shadow .42s ease;
}

.cr-why-card:hover { transform: translateY(-7px); box-shadow: var(--cr-shadow); }

.cr-why-icon {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 18px;
    margin-bottom: 16px;
    font-size: 1.3rem;
    color: var(--cr-brand);
    background: linear-gradient(140deg, #FDEEE8 0%, #F6D9CD 100%);
    border: 1px solid #F3D9D0;
}

.cr-why-card h3 { font-size: 1.08rem; font-weight: 700; color: var(--cr-ink); margin: 0 0 8px; }
.cr-why-card p { font-size: .94rem; line-height: 1.72; color: var(--cr-body); margin: 0; }

/* ------------------------------ openings ------------------------------ */
.cr-jobs {
    padding: clamp(56px, 7vw, 92px) 0;
    background:
        radial-gradient(760px 420px at 88% 4%, #FBE6DE 0%, rgba(251, 230, 222, 0) 62%),
        linear-gradient(180deg, #FFFBFA 0%, #FDF3EF 100%);
    border-top: 1px solid var(--cr-line);
    border-bottom: 1px solid var(--cr-line);
}

.cr-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 18px;
}

.cr-pill {
    padding: 10px 19px;
    border-radius: 999px;
    border: 1px solid var(--cr-line);
    background: #fff;
    color: #6B534F;
    font-family: var(--font-heading);
    font-size: .87rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: color .3s ease, background .3s ease, border-color .3s ease, transform .3s cubic-bezier(.22, .68, .3, 1);
}

.cr-pill:hover { border-color: #E5BFB6; color: var(--cr-brand); transform: translateY(-2px); }

.cr-pill.is-active {
    background: linear-gradient(120deg, #A32236 0%, #8E1B2E 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 12px 24px -14px rgba(158, 31, 43, .85);
}

.cr-count { margin: 0 0 22px; font-size: .88rem; color: var(--cr-muted); }
.cr-count strong { color: var(--cr-ink); font-weight: 600; }

.cr-job-list { display: flex; flex-direction: column; gap: 14px; }

.cr-job {
    border-radius: var(--cr-radius);
    background: #fff;
    border: 1px solid var(--cr-line);
    box-shadow: 0 10px 26px -22px rgba(96, 40, 38, .4);
    overflow: hidden;
    transition: box-shadow .4s ease, border-color .4s ease, transform .4s cubic-bezier(.22, .68, .3, 1);
}

.cr-job:hover { border-color: #EFD0C8; box-shadow: var(--cr-shadow); }
.cr-job.is-open { border-color: #E5BFB6; box-shadow: var(--cr-shadow); }

.cr-job-head {
    display: flex;
    align-items: center;
    gap: 18px;
    width: 100%;
    padding: 22px 24px;
    border: 0;
    background: none;
    text-align: left;
    cursor: pointer;
    font: inherit;
}

.cr-job-icon {
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    font-size: 1.15rem;
    color: var(--cr-brand);
    background: linear-gradient(140deg, #FDEEE8 0%, #F6D9CD 100%);
    border: 1px solid #F3D9D0;
}

.cr-job-title { flex: 1 1 auto; min-width: 0; }

.cr-job-code {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .16em;
    color: var(--cr-brand);
    margin-bottom: 4px;
}

.cr-job-title h3 {
    font-size: 1.14rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--cr-ink);
    margin: 0 0 8px;
}

.cr-job-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    font-size: .84rem;
    color: var(--cr-muted);
}

.cr-job-meta i { margin-right: 7px; color: #C79A90; }

.cr-job-toggle {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #FDF3EF;
    border: 1px solid var(--cr-line);
    color: var(--cr-brand);
    transition: transform .4s cubic-bezier(.22, .68, .3, 1), background .3s ease, color .3s ease;
}

.cr-job-head:hover .cr-job-toggle { background: #F6DED7; }
.cr-job.is-open .cr-job-toggle { transform: rotate(45deg); background: var(--cr-brand); color: #fff; border-color: transparent; }

.cr-job-panel {
    padding: 4px 24px 26px 94px;
    border-top: 1px solid #F8ECE8;
    animation: crOpen .45s cubic-bezier(.22, .68, .3, 1);
}

.cr-job-panel[hidden] { display: none; }

@keyframes crOpen {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: none; }
}

.cr-job-summary {
    margin: 18px 0 22px;
    padding: 16px 20px;
    border-radius: 16px;
    background: #FFFBFA;
    border-left: 3px solid #A32236;
    font-size: 1rem;
    line-height: 1.75;
    color: #4E3A36;
}

.cr-block { margin-bottom: 22px; }
.cr-block:last-of-type { margin-bottom: 0; }

.cr-block h4 {
    font-family: var(--font-heading);
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--cr-brand);
    margin: 0 0 10px;
}

.cr-block p { font-size: .98rem; line-height: 1.8; color: var(--cr-body); margin: 0 0 10px; }
.cr-block p:last-child { margin-bottom: 0; }

.cr-block ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.cr-block li {
    position: relative;
    padding-left: 26px;
    font-size: .97rem;
    line-height: 1.72;
    color: var(--cr-body);
}

.cr-block li::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 11px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #A32236;
}

.cr-job-acts { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

.cr-empty {
    padding: 54px 24px;
    text-align: center;
    border: 1px dashed var(--cr-line);
    border-radius: var(--cr-radius);
    background: #FFFDFC;
    color: var(--cr-muted);
}

/* ------------------------------ apply ------------------------------ */
.cr-apply { padding: clamp(56px, 7vw, 92px) 0; background: #fff; }

.cr-apply-card {
    padding: clamp(34px, 4.5vw, 56px);
    border-radius: 28px;
    border: 1px solid var(--cr-line);
    background:
        radial-gradient(620px 320px at 10% 0%, #FCE3DA 0%, rgba(252, 227, 218, 0) 62%),
        radial-gradient(520px 300px at 92% 100%, #FBEBD6 0%, rgba(251, 235, 214, 0) 60%),
        linear-gradient(160deg, #FFF9F7 0%, #FDF1EC 100%);
    box-shadow: var(--cr-shadow);
}

.cr-apply-card h2 {
    font-size: clamp(1.6rem, 2.8vw, 2.2rem);
    font-weight: 800;
    letter-spacing: -.025em;
    color: var(--cr-ink);
    margin: 16px 0 12px;
}

.cr-apply-card > p {
    max-width: 68ch;
    font-size: 1.02rem;
    line-height: 1.8;
    color: var(--cr-body);
    margin: 0 0 30px;
}

.cr-apply-card strong { color: var(--cr-ink); }

.cr-apply-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.cr-contact {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid var(--cr-line);
    transition: transform .35s cubic-bezier(.22, .68, .3, 1), box-shadow .35s ease;
}

.cr-contact .fa-whatsapp {
    color: var(--adv-wa-deep);
}

.cr-contact:hover { transform: translateY(-4px); box-shadow: 0 18px 36px -24px rgba(96, 40, 38, .5); }

.cr-contact-icon {
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-size: 1.05rem;
    color: var(--cr-brand);
    background: linear-gradient(140deg, #FDEEE8 0%, #F6D9CD 100%);
}

.cr-contact > span:not(.cr-contact-icon) {
    display: flex;
    flex-direction: column;
    font-size: .92rem;
    color: var(--cr-body);
    min-width: 0;
    flex: 1 1 auto;
}

.cr-contact a { color: var(--cr-body); word-break: break-word; }
.cr-contact a:hover { color: var(--cr-brand); text-decoration: underline; }

/* copy fallback for the address */
.cr-copy {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 13px;
    border-radius: 999px;
    border: 1px solid var(--cr-line);
    background: #FFFBFA;
    color: var(--cr-muted);
    font-family: var(--font-heading);
    font-size: .74rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .3s ease, color .3s ease, border-color .3s ease;
}

.cr-copy:hover { background: #FDF3EF; color: var(--cr-brand); border-color: #E5BFB6; }
.cr-copy.is-done { background: #FBF3EF; border-color: #EBD9CF; color: #8E1B2E; }

.cr-contact strong {
    font-family: var(--font-heading);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--cr-muted);
    margin-bottom: 3px;
}

/* ------------------------------ reveal ------------------------------ */
[data-reveal] {
    opacity: 0;
    transform: translate3d(0, 24px, 0);
    transition: opacity .72s cubic-bezier(.22, .68, .3, 1), transform .72s cubic-bezier(.22, .68, .3, 1);
    transition-delay: var(--d, 0ms);
}

[data-reveal].is-revealed { opacity: 1; transform: none; }

/* ------------------------------ responsive ------------------------------ */
@media (max-width: 1080px) {
    .cr-why-grid { grid-template-columns: repeat(2, 1fr); }
    .cr-apply-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
    .cr-why-grid { grid-template-columns: 1fr; }
    .cr-job-head { flex-wrap: wrap; gap: 14px; padding: 20px; }
    .cr-job-icon { flex-basis: 44px; width: 44px; height: 44px; }
    .cr-job-title { flex: 1 1 100%; order: 3; }
    .cr-job-panel { padding: 4px 20px 24px; }
    .cr-hero h1 { max-width: none; }

    /* The copy spans the full width here, so the veil has to as well. A
       2.5:1 photo in a portrait frame is mostly crop whatever you do, so it
       is framed on the window light behind the nurse rather than on her. */
    .cr-hero-photo { background-position: 62% 28%; }

    .cr-hero-veil {
        background:
            linear-gradient(180deg, rgba(46, 13, 21, .5) 0%, rgba(52, 15, 24, .78) 40%, rgba(42, 12, 19, .9) 100%);
    }
}

@media (prefers-reduced-motion: reduce) {
    [data-reveal] { opacity: 1; transform: none; transition: none; }
    .cr-job-panel { animation: none; }
    * { transition-duration: .01ms !important; }
}
