/* ==========================================================================
   DeltaGest Capital — Área pública de recrutamento (mobile-first)
   As cores vêm de theme.css.
   ========================================================================== */

html { scroll-padding-top: 90px; }
body { background: var(--dg-surface); }

/* Cabeçalho */
.site-header {
    background: rgba(255, 255, 255, .97);
    border-bottom: 1px solid var(--dg-border);
    backdrop-filter: saturate(180%) blur(6px);
}
.site-header .navbar { padding: .6rem 0; }
.site-header .dg-logo { height: 38px; }
.site-header .nav-link {
    color: var(--dg-ink);
    font-weight: 500;
    padding: .5rem .75rem;
}
.site-header .nav-link:hover,
.site-header .nav-link.active { color: var(--dg-accent); }
@media (min-width: 992px) {
    .site-header .dg-logo { height: 44px; }
}

/* Hero */
.hero {
    position: relative;
    overflow: hidden;
    background: var(--dg-primary-dark);
    color: #fff;
    padding: 4.5rem 0 5rem;
}
.hero-shape {
    position: absolute;
    inset: 0;
    pointer-events: none;
}
/* Triângulo e semicírculo inspirados no símbolo do logótipo */
.hero-shape::before {
    content: "";
    position: absolute;
    right: -6rem;
    bottom: -2rem;
    width: 26rem;
    height: 24rem;
    background: rgba(255, 255, 255, .06);
    clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.hero-shape::after {
    content: "";
    position: absolute;
    right: 4rem;
    top: 3rem;
    width: 14rem;
    height: 14rem;
    border-radius: 50%;
    border: 2px solid rgba(var(--dg-accent-rgb), .55);
    clip-path: inset(0 50% 0 0);
}
.hero-kicker {
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: .8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, .65);
}
.hero-title {
    font-size: clamp(2rem, 6vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -.02em;
    margin: 0;
}
.hero-lead {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, .8);
    max-width: 38rem;
}
@media (min-width: 992px) {
    .hero { padding: 7rem 0 7.5rem; }
    .hero-shape::before { right: 4rem; width: 34rem; height: 30rem; }
}

/* Cabeçalho de páginas internas */
.page-hero {
    background: var(--dg-primary-dark);
    color: #fff;
    padding: 2.5rem 0 2rem;
    border-bottom: 4px solid var(--dg-accent);
}
.page-hero-sm { padding: 2rem 0 1.5rem; }
.page-title { font-size: clamp(1.5rem, 4vw, 2.25rem); font-weight: 800; }
.page-hero .hero-kicker { color: rgba(255, 255, 255, .6); }
.breadcrumb-dark { --bs-breadcrumb-divider-color: rgba(255, 255, 255, .4); --bs-breadcrumb-item-active-color: rgba(255, 255, 255, .7); font-size: .875rem; }
.breadcrumb-dark a { color: #fff; }

/* Secções */
.section { padding: 3.5rem 0; }
.section-alt { background: var(--dg-surface-alt); }
.section-kicker {
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: .75rem;
    font-weight: 700;
    color: var(--dg-accent);
    margin-bottom: .25rem;
}
.section-title { font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 800; letter-spacing: -.01em; }
@media (min-width: 992px) { .section { padding: 5rem 0; } }

.pillar {
    background: var(--dg-surface);
    border: 1px solid var(--dg-border);
    border-radius: var(--dg-radius-lg);
    padding: 1.5rem;
}
.pillar-icon { font-size: 1.5rem; color: var(--dg-accent); }

/* Vagas */
.vacancy-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--dg-surface);
    border: 1px solid var(--dg-border);
    border-radius: var(--dg-radius-lg);
    padding: 1.5rem;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.vacancy-card:hover,
.vacancy-card:focus-within {
    border-color: var(--dg-primary);
    box-shadow: var(--dg-shadow);
}
.vacancy-card-media {
    display: block;
    width: calc(100% + 3rem);
    max-width: none;
    height: auto;
    aspect-ratio: 1200 / 630;
    object-fit: cover;
    margin: -1.5rem -1.5rem 1.25rem;
    border-radius: var(--dg-radius-lg) var(--dg-radius-lg) 0 0;
    background: var(--dg-border);
}
.vacancy-cover {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1200 / 630;
    max-height: 440px;
    object-fit: cover;
    border-radius: var(--dg-radius-lg);
    background: var(--dg-border);
}
.vacancy-meta li { display: flex; gap: .5rem; margin-bottom: .35rem; }
.vacancy-link { margin-top: auto; font-weight: 600; color: var(--dg-accent); }
.badge-open { background: rgba(31, 122, 77, .12); color: var(--dg-success); }

.empty-state {
    text-align: center;
    background: var(--dg-surface);
    border: 1px dashed var(--dg-border);
    border-radius: var(--dg-radius-lg);
    padding: 3rem 1.5rem;
}
.empty-state > .bi { font-size: 2.25rem; color: var(--dg-muted); }

.spontaneous {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: var(--dg-surface);
    border: 1px solid var(--dg-border);
    border-left: 4px solid var(--dg-accent);
    border-radius: var(--dg-radius-lg);
    padding: 1.5rem;
}
@media (min-width: 768px) {
    .spontaneous { flex-direction: row; align-items: center; justify-content: space-between; }
}

/* Detalhe da vaga */
.content-block { margin-bottom: 2rem; }
.summary-card {
    position: sticky;
    top: 96px;
    background: var(--dg-surface-alt);
    border: 1px solid var(--dg-border);
    border-radius: var(--dg-radius-lg);
    padding: 1.5rem;
}
.summary-card dt { font-size: .8rem; font-weight: 600; color: var(--dg-muted); text-transform: uppercase; letter-spacing: .05em; }
.summary-card dd { margin-bottom: 1rem; }

.policy-text h2 { font-weight: 700; }
.policy-text p, .policy-text li { color: #3a4654; line-height: 1.7; }

/* Formulário de candidatura */
.form-card {
    background: var(--dg-surface);
    border: 1px solid var(--dg-border);
    border-radius: var(--dg-radius-lg);
    padding: 1.25rem;
    box-shadow: var(--dg-shadow-sm);
}
@media (min-width: 768px) { .form-card { padding: 2rem; } }

.step-title {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 1.25rem;
    padding-bottom: .75rem;
    border-bottom: 1px solid var(--dg-border);
    width: 100%;
}
.step-title:focus { outline: none; }
.req { color: var(--dg-accent); }
.opt { color: var(--dg-muted); font-weight: 400; font-size: .85em; }
.form-label { font-weight: 500; }

.stepper { list-style: none; padding: 0; margin: 0; position: sticky; top: 96px; }
.stepper-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .55rem 0;
    color: var(--dg-muted);
    position: relative;
}
.stepper-item:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 15px;
    top: 42px;
    height: calc(100% - 30px);
    width: 2px;
    background: var(--dg-border);
}
.stepper-number {
    flex: 0 0 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid var(--dg-border);
    background: var(--dg-surface);
    font-weight: 700;
    font-size: .875rem;
    position: relative;
    z-index: 1;
}
.stepper-item.is-active { color: var(--dg-ink); font-weight: 600; }
.stepper-item.is-active .stepper-number { border-color: var(--dg-accent); color: var(--dg-accent); }
.stepper-item.is-done .stepper-number { background: var(--dg-primary); border-color: var(--dg-primary); color: #fff; }
.stepper-item.is-done::after { background: var(--dg-primary); }

.progress { height: 6px; }
.progress-bar { background: var(--dg-accent); width: 0; transition: width .2s ease; }

.repeater-item {
    border: 1px solid var(--dg-border);
    border-radius: var(--dg-radius);
    padding: 1rem;
    margin-bottom: 1rem;
    background: #fcfcfc;
}
.repeater-item-inline { padding: .75rem 1rem; margin-bottom: .5rem; }
.repeater-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .75rem;
}

.info-panel {
    display: flex;
    gap: 1rem;
    background: var(--dg-surface-alt);
    border-radius: var(--dg-radius);
    padding: 1.25rem;
}
.info-panel > .bi { font-size: 1.75rem; color: var(--dg-muted); }

.form-nav {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--dg-border);
}

/* Campo-isco anti-spam: fora do ecrã, invisível para leitores de ecrã */
.hp-field {
    position: absolute !important;
    left: -10000px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Resumo */
.summary-section {
    border: 1px solid var(--dg-border);
    border-radius: var(--dg-radius);
    padding: 1rem;
    margin-bottom: .75rem;
}
.summary-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .5rem; }
.summary-list { display: grid; grid-template-columns: 1fr; gap: .1rem .75rem; margin: 0; font-size: .875rem; }
.summary-list dt { color: var(--dg-muted); font-weight: 500; }
.summary-list dd { margin-bottom: .5rem; white-space: pre-line; word-break: break-word; }
@media (min-width: 768px) {
    .summary-list { grid-template-columns: minmax(10rem, 35%) 1fr; }
    .summary-list dd { margin-bottom: .25rem; }
}
.summary-item { border-top: 1px dashed var(--dg-border); padding-top: .5rem; margin-top: .5rem; }
.consent-box {
    background: var(--dg-surface-alt);
    border-radius: var(--dg-radius);
    padding: 1.25rem;
}

/* Sucesso */
.success-card {
    border: 1px solid var(--dg-border);
    border-top: 4px solid var(--dg-success);
    border-radius: var(--dg-radius-lg);
    padding: 2.5rem 1.5rem;
    box-shadow: var(--dg-shadow-sm);
}
.success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(31, 122, 77, .12);
    color: var(--dg-success);
    font-size: 2rem;
}
.code-box {
    display: inline-block;
    background: var(--dg-surface-alt);
    border: 1px dashed var(--dg-muted);
    border-radius: var(--dg-radius);
    padding: 1rem 1.5rem;
}
.code-value { font-size: 1.5rem; letter-spacing: .08em; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }

/* Rodapé */
.site-footer {
    background: var(--dg-primary-dark);
    color: rgba(255, 255, 255, .7);
    padding: 3rem 0 1.5rem;
    border-top: 4px solid var(--dg-accent);
}
.footer-symbol { outline: 1px solid rgba(255, 255, 255, .2); }
.footer-title {
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #fff;
    font-weight: 700;
    margin-bottom: .75rem;
}
.footer-list li { margin-bottom: .5rem; }
.site-footer a { color: rgba(255, 255, 255, .85); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-bottom {
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, .12);
    font-size: .8rem;
}
