/* Vacancy page (single-job_listing.php).
   Rules that compete with the theme's global typography (60px headings, icon
   bullets, link colours) start with ".content-wrapper .faptech-vacancy". */

.faptech-vacancy {
    --fv-accent: #00FFFF;
    --fv-text: rgba(255, 255, 255, 0.78);
    --fv-muted: rgba(255, 255, 255, 0.55);
    --fv-border: rgba(255, 255, 255, 0.08);
    max-width: 1200px;
    margin: 0 auto;
    padding: 8px 0 24px;
    color: var(--fv-text);
}

.faptech-vacancy svg {
    flex: 0 0 auto;
}

/* footer-custom-shortcode.css sets overflow-x: hidden on html and body, which
   turns body into a scroll container and stops the sidebar from sticking.
   "clip" hides horizontal overflow the same way without that side effect. */
body.single-job_listing {
    overflow-x: clip;
}


/* ---------- Header ---------- */
.faptech-vacancy__hero {
    position: relative;
    overflow: hidden;
    margin-bottom: 56px;
    padding: 40px 48px 46px;
    border: 1px solid var(--fv-border);
    border-radius: 28px;
    background:
        radial-gradient(80% 120% at 0% 0%, rgba(0, 255, 255, 0.1) 0%, rgba(0, 255, 255, 0) 55%),
        linear-gradient(180deg, #242424 0%, #1d1d1d 100%);
}

.faptech-vacancy__hero-inner {
    position: relative;
    z-index: 1;
    max-width: 760px;
}

.faptech-vacancy__network {
    position: absolute;
    top: 50%;
    right: -10px;
    width: 420px;
    height: auto;
    color: var(--fv-accent);
    opacity: 0.45;
    transform: translateY(-50%);
    pointer-events: none;
}

/* Vacancy thumbnail: fades in from the right of the header (from the top on small screens). */
.faptech-vacancy__media {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 48%;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 60%);
    mask-image: linear-gradient(90deg, transparent 0%, #000 60%);
    pointer-events: none;
}

.faptech-vacancy__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.faptech-vacancy__hero.has-photo .faptech-vacancy__hero-inner {
    max-width: 620px;
}

.content-wrapper .faptech-vacancy .faptech-vacancy__back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 26px;
    color: var(--fv-accent);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.content-wrapper .faptech-vacancy .faptech-vacancy__back:hover {
    color: #fff;
}

.content-wrapper .faptech-vacancy .faptech-vacancy__status {
    display: flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    margin: 0 0 16px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(0, 255, 255, 0.1);
    color: var(--fv-accent);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.faptech-vacancy__status::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 4px rgba(0, 255, 255, 0.18);
}

.content-wrapper .faptech-vacancy .faptech-vacancy__status.is-closed {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
}

.faptech-vacancy__status.is-closed::before {
    box-shadow: none;
}

.content-wrapper .faptech-vacancy .faptech-vacancy__title {
    margin: 0 !important;
    color: #fff;
    font-size: clamp(34px, 4.2vw, 56px);
    font-weight: 600;
    line-height: 1.08;
    letter-spacing: -0.01em;
}

.content-wrapper .faptech-vacancy .faptech-vacancy__subtitle {
    margin: 14px 0 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: clamp(17px, 1.5vw, 20px);
    line-height: 1.5;
}

.content-wrapper .faptech-vacancy .faptech-vacancy__facts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 28px 0 0;
    padding: 0;
    list-style: none;
}

.content-wrapper .faptech-vacancy .faptech-vacancy__facts > li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 9px 14px;
    border: 1px solid var(--fv-border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    font-size: 14px;
    line-height: 1.2;
}

.content-wrapper .faptech-vacancy .faptech-vacancy__facts > li::before {
    content: none;
}

.faptech-vacancy__facts svg {
    color: var(--fv-accent);
}


/* ---------- "Candidatar" buttons ---------- */
.content-wrapper .faptech-vacancy .faptech-vacancy__cta {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 15px 32px;
    border-radius: 999px;
    background: var(--fv-accent);
    color: #111;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    transition: box-shadow 0.2s, transform 0.2s;
}

.content-wrapper .faptech-vacancy .faptech-vacancy__cta:hover {
    color: #111;
    box-shadow: 0 10px 28px rgba(0, 255, 255, 0.25);
    transform: translateY(-1px);
}

.content-wrapper .faptech-vacancy .faptech-vacancy__cta--hero {
    margin-top: 30px;
}


/* ---------- Description + sidebar ---------- */
.faptech-vacancy__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 64px;
    align-items: start;
}

.faptech-vacancy__main {
    min-width: 0;
}

.faptech-vacancy__aside {
    position: sticky;
    top: 120px;
}

.faptech-vacancy__description {
    color: var(--fv-text);
    font-size: 16px;
    line-height: 1.8;
}

.content-wrapper .faptech-vacancy .faptech-vacancy__description h2,
.content-wrapper .faptech-vacancy .faptech-vacancy__description h3,
.content-wrapper .faptech-vacancy .faptech-vacancy__description h4 {
    margin: 52px 0 20px !important;
    color: #fff;
    font-size: 26px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: 0;
}

.content-wrapper .faptech-vacancy .faptech-vacancy__description h2::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    margin-top: 12px;
    border-radius: 3px;
    background: var(--fv-accent);
}

.content-wrapper .faptech-vacancy .faptech-vacancy__description h3 {
    margin-top: 36px !important;
    font-size: 21px;
}

.content-wrapper .faptech-vacancy .faptech-vacancy__description h4 {
    margin-top: 28px !important;
    font-size: 18px;
}

.content-wrapper .faptech-vacancy .faptech-vacancy__description > :first-child {
    margin-top: 0 !important;
}

.content-wrapper .faptech-vacancy .faptech-vacancy__description p {
    margin: 0 0 16px;
}

/* Balanced line endings (no single word left on the last line) where supported. */
.faptech-vacancy__description p,
.faptech-vacancy__description li {
    text-wrap: pretty;
}

.content-wrapper .faptech-vacancy .faptech-vacancy__description strong,
.content-wrapper .faptech-vacancy .faptech-vacancy__description b {
    color: #fff;
    font-weight: 700;
}

.content-wrapper .faptech-vacancy .faptech-vacancy__description a {
    color: var(--fv-accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.content-wrapper .faptech-vacancy .faptech-vacancy__description ul,
.content-wrapper .faptech-vacancy .faptech-vacancy__description ol {
    margin: 0 0 20px;
    padding: 0;
    list-style: none;
}

.content-wrapper .faptech-vacancy .faptech-vacancy__description li {
    position: relative;
    margin: 0 0 12px;
    padding: 0 0 0 30px;
}

.content-wrapper .faptech-vacancy .faptech-vacancy__description li ul,
.content-wrapper .faptech-vacancy .faptech-vacancy__description li ol {
    margin: 10px 0 0;
}

/* Diamond bullets instead of the theme's icon-font glyph. */
.content-wrapper .faptech-vacancy .faptech-vacancy__description ul > li::before {
    content: '';
    display: block;
    position: absolute;
    top: 10px;
    left: 4px;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    background: var(--fv-accent);
    box-shadow: 0 0 12px rgba(0, 255, 255, 0.45);
    font: inherit;
    transform: rotate(45deg);
}

/* Bullets that start in bold: the bold words are the bullet's title. */
.content-wrapper .faptech-vacancy .faptech-vacancy__description li.is-titled {
    margin-bottom: 22px;
}

.content-wrapper .faptech-vacancy .faptech-vacancy__description .faptech-vacancy__item-title {
    display: block;
    margin-bottom: 2px;
    color: #fff;
    font-size: 17px;
    line-height: 1.5;
}

.content-wrapper .faptech-vacancy .faptech-vacancy__description ul > li.is-titled::before {
    top: 9px;
}

.content-wrapper .faptech-vacancy .faptech-vacancy__description ol {
    counter-reset: faptech-vacancy-step;
}

.content-wrapper .faptech-vacancy .faptech-vacancy__description ol > li {
    padding-left: 40px;
    counter-increment: faptech-vacancy-step;
}

.content-wrapper .faptech-vacancy .faptech-vacancy__description ol > li::before {
    content: counter(faptech-vacancy-step);
    position: absolute;
    top: 2px;
    left: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(0, 255, 255, 0.12);
    color: var(--fv-accent);
    font-size: 13px;
    font-weight: 700;
    line-height: 26px;
    text-align: center;
}

.faptech-vacancy .faptech-job-apply {
    scroll-margin-top: 110px;
}

.faptech-vacancy__notice {
    padding: 24px 28px;
    border: 1px solid var(--fv-border);
    border-radius: 18px;
    background: #222;
    color: #fff;
}

.content-wrapper .faptech-vacancy .faptech-vacancy__notice a {
    color: var(--fv-accent);
}


/* ---------- Sidebar ---------- */
.faptech-vacancy__card {
    padding: 28px;
    border: 1px solid var(--fv-border);
    border-radius: 22px;
    background: #222;
}

.content-wrapper .faptech-vacancy .faptech-vacancy__card-title {
    margin: 0 0 18px;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
}

.content-wrapper .faptech-vacancy .faptech-vacancy__summary {
    margin: 0 0 24px;
    padding: 0;
    list-style: none;
}

.content-wrapper .faptech-vacancy .faptech-vacancy__summary > li {
    display: flex;
    gap: 12px;
    margin: 0;
    padding: 13px 0;
    border-top: 1px solid var(--fv-border);
}

.content-wrapper .faptech-vacancy .faptech-vacancy__summary > li::before {
    content: none;
}

.content-wrapper .faptech-vacancy .faptech-vacancy__summary > li:first-child {
    padding-top: 0;
    border-top: 0;
}

.faptech-vacancy__summary svg {
    margin-top: 2px;
    color: var(--fv-accent);
}

.faptech-vacancy__summary-label {
    display: block;
    color: var(--fv-muted);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.faptech-vacancy__summary-value {
    display: block;
    margin-top: 2px;
    color: #fff;
    font-size: 15px;
    line-height: 1.45;
}

.content-wrapper .faptech-vacancy .faptech-vacancy__card .faptech-vacancy__cta {
    display: flex;
    width: 100%;
}

.faptech-vacancy__share {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--fv-border);
}

.faptech-vacancy__share-label {
    margin-right: auto;
    color: var(--fv-muted);
    font-size: 13px;
}

/* The copy button also beats the theme's button styles (gradient ::after border). */
.content-wrapper .faptech-vacancy .faptech-vacancy__share a,
.content-wrapper .faptech-vacancy .faptech-vacancy__share .faptech-vacancy__copy {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 0 !important;
    height: 36px;
    margin: 0 !important;
    padding: 0 12px !important;
    border: 1px solid var(--fv-border) !important;
    border-radius: 999px !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #fff !important;
    font-size: 13px;
    font-weight: 600;
    line-height: 1 !important;
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}

.content-wrapper .faptech-vacancy .faptech-vacancy__share a:hover,
.content-wrapper .faptech-vacancy .faptech-vacancy__share .faptech-vacancy__copy:hover {
    border-color: var(--fv-accent) !important;
    color: var(--fv-accent) !important;
}

.content-wrapper .faptech-vacancy .faptech-vacancy__share .faptech-vacancy__copy::after {
    content: none !important;
    display: none !important;
}


/* ---------- Responsive ---------- */
@media (min-width: 1101px) {
    /* The sidebar has its own button. */
    .content-wrapper .faptech-vacancy .faptech-vacancy__cta--hero {
        display: none;
    }
}

@media (max-width: 1100px) {
    .faptech-vacancy__layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 32px;
    }

    /* The header already shows the facts and the button: keep only the
       "Partilhar" row, below the vacancy. */
    .faptech-vacancy__aside {
        position: static;
    }

    .faptech-vacancy__aside .faptech-vacancy__card-title,
    .faptech-vacancy__aside .faptech-vacancy__summary,
    .content-wrapper .faptech-vacancy .faptech-vacancy__card .faptech-vacancy__cta {
        display: none;
    }

    .faptech-vacancy__card {
        padding: 14px 20px;
    }

    .faptech-vacancy__share {
        margin-top: 0;
        padding-top: 0;
        border-top: 0;
    }
}

@media (max-width: 1000px) {
    .faptech-vacancy__network {
        display: none;
    }

    /* The photo becomes a band across the top of the header. */
    .faptech-vacancy__media {
        position: relative;
        width: auto;
        height: 210px;
        margin: -40px -48px 24px;
        -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
        mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
    }

    .faptech-vacancy__hero.has-photo .faptech-vacancy__hero-inner {
        max-width: none;
    }
}

@media (max-width: 640px) {
    .faptech-vacancy__hero {
        margin-bottom: 40px;
        padding: 26px 22px 30px;
        border-radius: 22px;
    }

    .faptech-vacancy__media {
        height: 170px;
        margin: -26px -22px 18px;
    }

    .content-wrapper .faptech-vacancy .faptech-vacancy__facts > li {
        padding: 8px 12px;
        font-size: 13px;
    }

    .content-wrapper .faptech-vacancy .faptech-vacancy__cta--hero {
        display: flex;
        width: 100%;
    }

    .content-wrapper .faptech-vacancy .faptech-vacancy__description h2 {
        font-size: 22px;
    }
}
