/* V3 — Bolder, editorial. Photo-led cards, oversized Poppins display type,
   navy hero band in detail, orange rules. Scoped under .v3-root. */

@font-face {
    font-family: 'Poppins';
    src: url('../shared/fonts/Poppins-600.woff2') format('woff2');
    font-weight: 600;
}
@font-face {
    font-family: 'Poppins';
    src: url('../shared/fonts/Poppins-700.woff2') format('woff2');
    font-weight: 700;
}
@font-face {
    font-family: 'Inter';
    src: url('../shared/fonts/Inter-Variable.woff2') format('woff2');
    font-weight: 100 900;
}

.v3-root {
    --brand-navy: #1f487e;
    --brand-navy-deep: #153155;
    --brand-navy-ink: #102541;
    --brand-orange: #f27046;
    --brand-orange-text: #cd3d0e;
    --brand-cream: #f8f7f4;
    --brand-line: #e0e0e0;
    --font-display: 'Poppins', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --font-body: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;

    font-family: var(--font-body);
    color: var(--brand-navy);
    font-size: 16px;
    line-height: 1.4;
    max-width: 72rem;
    margin: 0 auto;
    padding: 1rem;
}

/* ---- Grid view ---- */

.v3-root .directory-header {
    border-bottom: 3px solid var(--brand-navy);
    padding-bottom: 0.75rem;
    margin-bottom: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.v3-root .directory-header h1 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 2rem;
    line-height: 1.1;
    margin: 0;
    letter-spacing: -0.01em;
}

.v3-root .filter-group {
    display: inline-flex;
    gap: 0.25rem;
}

.v3-root .filter-btn {
    appearance: none;
    border: 0;
    border-bottom: 3px solid transparent;
    background: transparent;
    color: var(--brand-navy);
    font: inherit;
    font-weight: 700;
    font-size: 0.9375rem;
    padding: 0.3rem 0.6rem;
    cursor: pointer;
}

.v3-root .filter-btn.is-active {
    color: var(--brand-orange-text);
    border-bottom-color: var(--brand-orange-text);
}

.v3-root .card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    align-items: stretch;
}

@media (min-width: 48em) {
    .v3-root .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.v3-root .candidate-card {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    background: #ffffff;
    border: 1px solid var(--brand-line);
    border-radius: 6px;
    overflow: hidden;
}

.v3-root .candidate-card:focus-visible {
    outline: 3px solid var(--brand-orange);
    outline-offset: 2px;
}

.v3-root .photo-wrap {
    position: relative;
    overflow: hidden;
    background: var(--brand-cream);
}

.v3-root .card-photo {
    width: 100%;
    aspect-ratio: 4 / 3;
}

.v3-root .photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 45%;
}

.v3-root .photo-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-navy);
    opacity: 0.15;
}

.v3-root .photo-placeholder svg {
    width: 4rem;
    height: 4rem;
}

.v3-root .card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 1rem 1.25rem 1.25rem;
}

.v3-root .ref-line {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--brand-orange-text);
    margin: 0.15rem 0 0.3rem;
}

.v3-root .card-body h2 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.6rem;
    line-height: 1.15;
    margin: 0;
    letter-spacing: -0.01em;
    text-wrap: balance;
}

.v3-root .meta-line {
    font-size: 0.875rem;
    font-weight: 500;
    margin: 0 0 0.4rem;
}

.v3-root .work-line {
    font-size: 0.875rem;
    margin: 0 0 0.25rem;
}

.v3-root .skills-line {
    font-size: 0.8125rem;
    opacity: 0.85;
    margin: 0 0 0.25rem;
}

.v3-root .salary-line {
    font-size: 0.9375rem;
    font-weight: 700;
    margin: 0.15rem 0 0;
}

.v3-root .worker-note {
    text-wrap: pretty;
    font-size: 0.875rem;
    line-height: 1.45;
    margin: 0.6rem 0 0;
    padding-top: 0.6rem;
    border-top: 2px solid var(--brand-orange);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}

.v3-root .card-actions {
    margin-top: auto;
    padding-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.v3-root .read-more-link {
    color: var(--brand-navy);
    font-weight: 700;
    font-size: 0.9375rem;
    text-decoration: none;
}

.v3-root .candidate-card:hover .read-more-link {
    color: var(--brand-orange-text);
}

.v3-root .enquire-btn {
    appearance: none;
    background: var(--brand-orange-text);
    border: 0;
    color: #ffffff;
    border-radius: 5px;
    font: inherit;
    font-size: 0.875rem;
    font-weight: 700;
    padding: 0.5rem 1rem;
    cursor: pointer;
}

.v3-root .enquire-btn:hover {
    background: var(--brand-navy-ink);
}

.v3-root .load-more-row {
    text-align: center;
    padding: 1.5rem 0;
}

.v3-root .load-more-btn,
.v3-root .nav-btn {
    appearance: none;
    background: transparent;
    border: 2px solid var(--brand-navy);
    color: var(--brand-navy);
    border-radius: 5px;
    font: inherit;
    font-weight: 700;
    font-size: 0.875rem;
    padding: 0.45rem 1.1rem;
    cursor: pointer;
}

.v3-root .load-more-btn:hover,
.v3-root .nav-btn:hover:not(:disabled) {
    background: var(--brand-navy);
    color: #ffffff;
}

.v3-root .nav-btn:disabled {
    opacity: 0.35;
    cursor: default;
}

.v3-root .empty-state,
.v3-root .detail-not-found {
    padding: 2rem 0;
    opacity: 0.7;
}

/* ---- Detail view ---- */

.v3-root .detail-view {
    max-width: 60rem;
    margin: 0 auto;
}

.v3-root .detail-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.v3-root .prev-next-group {
    display: inline-flex;
    gap: 0.4rem;
}

.v3-root .detail-card {
    background: #ffffff;
    border: 1px solid var(--brand-line);
    border-radius: 6px;
    overflow: hidden;
}

.v3-root .detail-hero {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    background: var(--brand-navy);
    color: var(--brand-cream);
    padding: 1.75rem 2rem;
}

.v3-root .hero-photo {
    flex: 0 0 auto;
    width: 11rem;
    height: 11rem;
    border-radius: 6px;
    border: 3px solid var(--brand-cream);
}

.v3-root .detail-hero .ref-line {
    color: var(--brand-cream);
    opacity: 0.85;
}

.v3-root .detail-hero h2 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 2.5rem;
    line-height: 1.1;
    margin: 0 0 0.35rem;
    letter-spacing: -0.01em;
}

.v3-root .detail-hero .meta-line {
    font-size: 1rem;
    margin: 0;
    opacity: 0.9;
}

.v3-root .fact-band {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    padding: 1.25rem 2rem;
    border-bottom: 1px solid var(--brand-line);
    background: var(--brand-cream);
}

.v3-root .fact {
    min-width: 10rem;
    flex: 1;
}

.v3-root .fact-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--brand-orange-text);
    margin-bottom: 0.2rem;
}

.v3-root .fact-value {
    font-size: 0.9375rem;
    font-weight: 500;
}

.v3-root .detail-sections {
    padding: 0.5rem 2rem 1.5rem;
}

.v3-root .detail-section {
    margin-top: 1.5rem;
}

.v3-root .section-title {
    font-family: var(--font-display);
    font-size: 0.9375rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--brand-navy);
    border-left: 4px solid var(--brand-orange);
    padding-left: 0.6rem;
    margin: 0 0 0.4rem;
}

.v3-root .detail-body {
    text-wrap: pretty;
    font-size: 0.9375rem;
    line-height: 1.5;
    margin: 0.15rem 0;
}

.v3-root .pre-wrap {
    white-space: pre-wrap;
}

.v3-root .detail-card .card-actions {
    padding: 0 2rem 2rem;
}

.v3-root .detail-card .enquire-btn {
    width: 100%;
    padding: 0.8rem 1rem;
    font-size: 1rem;
}

/* Phones */
@media (max-width: 47.99em) {
    .v3-root .detail-hero {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem 1.25rem;
    }

    .v3-root .detail-hero h2 {
        font-size: 2rem;
    }

    .v3-root .fact-band {
        gap: 1rem;
        padding: 1rem 1.25rem;
    }

    .v3-root .detail-sections,
    .v3-root .detail-card .card-actions {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
}

/* Browser surfaces: selection from the palette; icons optically aligned */
.v3-root ::selection {
    background: var(--brand-orange);
    color: #ffffff;
}

.v3-root .nav-btn .icon,
.v3-root .read-more-link .icon {
    vertical-align: -0.15em;
}
