/* =========================================
   Staff pages only
   - Scope: body.post-type-archive-staff / body.single-staff
========================================= */

/* ===== Archive: /staff/ ===== */
.post-type-archive-staff .bb-staff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 20px;
}

.post-type-archive-staff .bb-staff-card {
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.post-type-archive-staff .bb-staff-card__link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.post-type-archive-staff .bb-staff-card__thumb {
    aspect-ratio: 0.8 / 1;
    overflow: hidden;
    background: #f5f5f5;
}

.post-type-archive-staff .bb-staff-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.post-type-archive-staff .bb-staff-card__body {
    padding: 12px;
}

.post-type-archive-staff .bb-staff-card__title {
    font-size: 24px;
    margin: 0 0 6px;
}

.post-type-archive-staff .bb-staff-card__meta {
    font-size: 12px;
    color: #555;
    margin: 2px 0;
}

.post-type-archive-staff .bb-staff-card__meta--sub {
    color: #777;
}

/* ===== Single: /staff/{slug}/ ===== */
.single-staff .bb-staff__head {
    margin-bottom: 12px;
}

.single-staff .bb-staff__title {
    margin: 0 0 4px;
}

.single-staff .bb-staff__meta {
    color: #555;
    font-size: 14px;
}

/* Eyebrow above H1 */
.single-staff .bb-staff__eyebrow {
    margin: 0 0 6px;
    color: var(--accent);
    /* #D35B29 */
    font-weight: 700;
    font-size: 12px;
    letter-spacing: .04em;
}

/* ===== Intro 2カラム（画像 左 / 地域+挨拶 右） ===== */
.single-staff .bb-staff__intro {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 2fr;
    gap: 24px;
    align-items: start;
    margin-bottom: 24px;
}

/* 画像：最大370px + フレーム */
.single-staff .bb-staff__intro-left {
    display: flex;
    justify-content: flex-start;
}

.single-staff .bb-staff__thumb {
    max-width: 370px;
    margin: 0 0 16px;
    border: 15px solid #e5e5e5;
    border-radius: 0;
}

.single-staff .bb-staff__thumb img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 0;
}

/* 活動地域（タイトル無しで表示） → 20px */
.single-staff .bb-staff__region {
    margin: 0 0 12px;
    font-size: 20px;
    color: #555;
    font-weight: 900;
}

/* ご挨拶 / プロフィールのタイトル → 24px */
.single-staff .bb-staff__h2 {
    font-size: 24px;
    margin: 0 0 8px;
}

/* ご挨拶本文 */
.single-staff .bb-staff__greeting .entry-content {
    line-height: 1.9;
}

/* ==== Staff profile table (orange header / grey body) ==== */
.single-staff .bb-profile-table {
    width: 100%;
    border-collapse: separate;
    /* セルごとの白枠を活かす */
    border-spacing: 0;
    background: transparent;
}

.single-staff .bb-profile-table th,
.single-staff .bb-profile-table td {
    padding: 12px 14px;
    border: 1px solid #fff;
    /* 枠線：白 */
    vertical-align: top;
}

/* 項目セル（左） */
.single-staff .bb-profile-table th {
    width: 160px;
    /* 以前 140px → 少し広め */
    background: #D35B29;
    /* 背景：オレンジ */
    color: #fff;
    /* 文字：白 */
    text-align: left;
    font-weight: 700;
    font-size: 14px;
}

/* 内容セル（右） */
.single-staff .bb-profile-table td {
    background: #fafafa;
    /* 背景：グレー */
    color: #111;
    font-size: 14px;
    word-break: break-word;
}

.single-staff .bb-profile-table td a {
    color: inherit;
    /* 可読性キープ */
    text-decoration: underline;
}

/* 行の角丸（視認性UP） */
.single-staff .bb-profile-table tr:first-child th {
    border-top-left-radius: 8px;
}

.single-staff .bb-profile-table tr:first-child td {
    border-top-right-radius: 8px;
}

.single-staff .bb-profile-table tr:last-child th {
    border-bottom-left-radius: 8px;
}

.single-staff .bb-profile-table tr:last-child td {
    border-bottom-right-radius: 8px;
}

/* === Back to archive button === */
.single-staff .bb-back-archive {
    margin-top: clamp(24px, 4vw, 40px);
    text-align: center;
}

.bb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5em;
    padding: .8rem 1.2rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    line-height: 1;
}

.bb-btn--dark {
    background: #000;
    color: #fff;
    border: 1px solid #000;
    transition: opacity .2s ease;
}

.bb-btn--dark:hover {
    opacity: .85;
}

.bb-btn:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* Grid：SP1列 / PC3列 */
.bb-staff-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: 1fr;
}

@media (min-width: 1024px) {
    .bb-staff-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Card */
.bb-staff-card {
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .04);
    transition: transform .2s ease, box-shadow .2s ease;
}

.bb-staff-card__link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.bb-staff-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, .08);
}

/* Thumb：正方形トリミング */
.bb-staff-card__thumb {
    aspect-ratio: 1/1;
    background: #f6f6f6;
}

.bb-staff-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.bb-staff-card__img--placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f1f1f1, #e7e7e7);
}

/* Body（②〜⑤のブロック） */
.bb-staff-card__body {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 名前＋フリガナをひとかたまりで */
.bb-staff-card__nameblock {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bb-staff-card__title {
    font-size: 18px;
    line-height: 1.4;
    font-weight: 700;
    margin: 0;
}

.bb-staff-card__kana {
    font-size: 12px;
    color: #666;
    line-height: 1;
    letter-spacing: .04em;
}

/* 活動地域・活動名（定義リスト） */
.bb-staff-card__details {
    margin: 0;
    padding: 12px;
    background: #fafafa;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bb-staff-card__row {
    display: flex;
    gap: 8px;
}

.bb-staff-card__row dt {
    flex: 0 0 auto;
    min-width: 64px;
    color: #555;
    font-size: 12px;
}

.bb-staff-card__row dd {
    margin: 0;
    color: #222;
    font-size: 14px;
    line-height: 1.5;
}

/* SP：縦積み & 画像中央寄せ */
@media (max-width: 767px) {
    .single-staff .bb-staff__intro {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .single-staff .bb-staff__region {
        font-size: 18px;
    }

    .single-staff .bb-staff__h2 {
        font-size: 20px;
    }

    .single-staff .bb-staff__intro-left {
        justify-content: center;
    }

    .single-staff .bb-profile-table {
        border-spacing: 0;
    }

    .single-staff .bb-profile-table,
    .single-staff .bb-profile-table tbody {
        display: block;
        width: 100%;
    }

    .single-staff .bb-profile-table tr {
        display: block;
        width: 100%;
        border: 1px solid #fff;
        /* 行全体の白枠 */
        border-radius: 8px;
        overflow: hidden;
        margin-bottom: 10px;
    }

    .single-staff .bb-profile-table th,
    .single-staff .bb-profile-table td {
        display: block;
        width: 100%;
        border: none;
        /* 行ボックスに枠線を集約 */
    }

    .single-staff .bb-profile-table th {
        background: #D35B29;
        color: #fff;
        padding: 10px 12px;
    }

    .single-staff .bb-profile-table td {
        background: #f1f1f1;
        padding: 10px 12px;
    }

    .single-staff .bb-profile-table tr:first-child td {
        border-top-right-radius: 0px;
    }

    .single-staff .bb-profile-table tr:last-child th {
        border-bottom-left-radius: 0px;
    }

    .bb-btn {
        width: 100%;
    }
}