/* ==========================================================================
   Our People – staff directory (template: ourteammultipledept.php)
   Hartland branding: navy #003A5A, olive #8E993D
   Headings follow --primary--font: "Helvetica Neue", "Jost", "LeBeauneNew"
   ========================================================================== */

/* The theme's own Helvetica Neue files (assets/tempfonts), registered with correct
   weights under a private name so Windows/Android visitors get Helvetica Neue too.
   Only loaded on this template, so other pages are unaffected. */
@font-face {
    font-family: 'HIS Helvetica Neue';
    src: url('../tempfonts/HelveticaNeueLight.woff2') format('woff2'),
         url('../tempfonts/HelveticaNeueLight.woff') format('woff');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'HIS Helvetica Neue';
    src: url('../tempfonts/HelveticaNeueRegular.woff2') format('woff2'),
         url('../tempfonts/HelveticaNeueRegular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'HIS Helvetica Neue';
    src: url('../tempfonts/HelveticaNeueMedium.woff2') format('woff2'),
         url('../tempfonts/HelveticaNeueMedium.woff') format('woff');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'HIS Helvetica Neue';
    src: url('../tempfonts/HelveticaNeueBold.woff2') format('woff2'),
         url('../tempfonts/HelveticaNeueBold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

.his-people {
    --hp-navy: #003A5A;
    --hp-navy-soft: #4a6a80;
    --hp-olive: #8E993D;
    --hp-bg: #f1f2f4;
    --hp-card: #ffffff;
    --hp-display: "Helvetica Neue", "HIS Helvetica Neue", "Jost", "LeBeauneNew", Helvetica, Arial, sans-serif;
    --hp-body: 'Jost', 'Helvetica Neue', Arial, sans-serif;

    background: var(--hp-bg);
    padding: 80px 0 0;
    font-family: var(--hp-body);
    overflow-x: clip;
}

.his-people__inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 40px;
}

/* ---------- Intro ---------- */
.his-people__intro {
    text-align: center;
    margin-bottom: 64px;
}
.his-people__eyebrow {
    display: inline-block;
    font-family: var(--hp-body);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--hp-olive);
    margin-bottom: 14px;
}
.his-people .his-people__title {
    font-family: var(--hp-display);
    font-weight: 500;
    font-size: 48px;
    line-height: 1.15;
    color: var(--hp-navy);
    margin: 0;
    padding: 0;
    letter-spacing: -0.5px;
    text-transform: none;
}
.his-people__intro::after {
    content: '';
    display: block;
    width: 64px;
    height: 3px;
    margin: 24px auto 0;
    background: var(--hp-olive);
}

/* ---------- Department block: full-width bands, grey / white / grey ... ---------- */
.his-people__dept {
    position: relative;
    padding: 64px 0 72px;
    background: var(--hp-bg);
    box-shadow: 0 0 0 100vmax var(--hp-bg);
    clip-path: inset(0 -100vmax);
}
.his-people__dept:nth-of-type(even) {
    background: #ffffff;
    box-shadow: 0 0 0 100vmax #ffffff;
}
.his-people__intro + .his-people__dept {
    padding-top: 0;
}
.his-people .his-people__dept-title {
    font-family: var(--hp-display);
    font-weight: 500;
    font-size: 32px;
    line-height: 1.2;
    color: var(--hp-navy);
    margin: 0 0 36px;
    padding: 0;
    letter-spacing: -0.3px;
    text-transform: none;
}

/* ---------- Grid ---------- */
.his-people .his-people__grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    /* Card width = one column of the PAGE's "People per row" setting (default 5),
       so every department on a page shows the same card size. A department's own
       setting (--hp-n) only decides how many cards sit in a row before wrapping. */
    --hp-base: 5;
    --hp-n: 5;
    --hp-gx: 32px;
    column-gap: var(--hp-gx);
    row-gap: 48px;
    grid-template-columns: repeat(var(--hp-n), calc((100% - (var(--hp-base) - 1) * var(--hp-gx)) / var(--hp-base)));
}
/* Page setting (sidebar box) -> card size for the whole page */
.his-people--page-6 .his-people__grid { --hp-base: 6; }
.his-people--page-4 .his-people__grid { --hp-base: 4; }
.his-people--page-3 .his-people__grid { --hp-base: 3; }
/* Department setting -> how many per row (never more than the page setting) */
.his-people .his-people__grid--cols-6 { --hp-n: 6; }
.his-people .his-people__grid--cols-5 { --hp-n: 5; }
.his-people .his-people__grid--cols-4 { --hp-n: 4; }
.his-people .his-people__grid--cols-3 { --hp-n: 3; }
.his-people .his-person {
    margin: 0;
    padding: 0;
    list-style: none;
}
.his-person__link {
    display: block;
    color: inherit;
    text-decoration: none;
}

/* ---------- Photo ---------- */
.his-person__photo {
    position: relative;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: #dfe3e7;
}
.his-person__photo img,
.his-person__placeholder {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transition: transform .6s ease;
}
.his-person__placeholder {
    background: linear-gradient(160deg, #e3e7eb, #cfd6dc);
}
.his-person__photo::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4px;
    background: var(--hp-olive);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .4s ease;
}
.his-person:hover .his-person__photo img { transform: scale(1.04); }
.his-person:hover .his-person__photo::after { transform: scaleX(1); }
.his-person.has-bio .his-person__link:focus-visible {
    outline: 3px solid var(--hp-olive);
    outline-offset: 4px;
}

/* ---------- Name & role ---------- */
.his-person__body {
    padding-top: 22px;
    text-align: center;
}
.his-people .his-person__name {
    font-family: var(--hp-display);
    font-weight: 500;
    font-size: 19px;
    line-height: 1.3;
    color: var(--hp-navy);
    margin: 0 0 10px;
    padding: 0;
    letter-spacing: 0;
    text-transform: none;
}
.his-people .his-person__role {
    font-family: var(--hp-body);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.45;
    letter-spacing: .6px;
    text-transform: uppercase;
    color: var(--hp-navy-soft);
    margin: 0 0 4px;
    padding: 0;
}

.his-person__more {
    display: inline-block;
    margin-top: 12px;
    padding-bottom: 2px;
    font-family: var(--hp-body);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--hp-olive);
    border-bottom: 1px solid currentColor;
    transition: color .3s ease;
}
.his-person.has-bio .his-person__link { cursor: pointer; }
.his-person.has-bio:hover .his-person__more { color: var(--hp-navy); }

/* ---------- Responsive ---------- */
/* "Start a new row after this person" (admin checkbox): the next person begins a new row.
   Desktop/laptop only; on tablets and phones cards simply flow 3 / 2 per row. */
@media (min-width: 1101px) {
    .his-people .his-person--row-start { grid-column-start: 1; }
}

@media (max-width: 1280px) {
    .his-people--page-6 .his-people__grid { --hp-base: 5; }
    .his-people .his-people__grid--cols-6 { --hp-n: 5; }
}
@media (max-width: 1100px) {
    .his-people--page-6 .his-people__grid,
    .his-people--page-5 .his-people__grid { --hp-base: 4; }
    .his-people .his-people__grid { --hp-gx: 24px; row-gap: 40px; }
    .his-people .his-people__grid--cols-6,
    .his-people .his-people__grid--cols-5 { --hp-n: 4; }
    .his-people .his-people__title { font-size: 40px; }
}
@media (max-width: 860px) {
    .his-people { padding: 56px 0 0; }
    .his-people__inner { padding: 0 24px; }
    .his-people .his-people__grid[class*="--cols-"] { --hp-base: 3; --hp-n: 3; --hp-gx: 20px; row-gap: 40px; }
    .his-people .his-people__dept-title { font-size: 28px; margin-bottom: 28px; }
    .his-people__dept { padding: 48px 0 56px; }
}
@media (max-width: 600px) {
    .his-people__inner { padding: 0 16px; }
    .his-people__intro { margin-bottom: 44px; }
    .his-people .his-people__title { font-size: 30px; }
    .his-people .his-people__grid[class*="--cols-"] { --hp-base: 2; --hp-n: 2; --hp-gx: 16px; row-gap: 32px; }
    .his-people .his-people__dept-title { font-size: 24px; }
    .his-people .his-people__grid .his-person__name { font-size: 17px; margin-bottom: 6px; }
    .his-people .his-person__role { font-size: 12px; letter-spacing: .3px; }
    .his-person__body { padding-top: 14px; }
}
