/* ========================================
   コンサルタントインタビューのカード（トップページ・インタビュー一覧・記事下部で共通）
   マークアップ：template-parts/interview-card.php
   PC：4列（記事下部は3列） / タブレット・スマホ：2列。角丸・片側だけの色線は使わない。
======================================== */
.iv-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.iv-grid.is-3col {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.iv-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border: 1px solid var(--color-border, #e2e8f0);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
    color: var(--color-text, #0f172a);
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.iv-card-link:hover,
.iv-card-link:focus-visible {
    transform: translateY(-6px);
    border-color: rgba(30, 64, 175, 0.35);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.iv-card-link:focus-visible {
    outline: 2px solid var(--color-primary, #1e40af);
    outline-offset: 3px;
}

.iv-card-image {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--color-base-dark, #f1f5f9);
}

.iv-card-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
    transition: transform 0.4s ease;
}

.iv-card-link:hover .iv-card-image img {
    transform: scale(1.04);
}

.iv-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 10px;
    padding: 18px 20px 22px;
}

.iv-card-person {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 2px 10px;
    margin: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--color-border, #e2e8f0);
}

.iv-card-name {
    color: var(--color-text, #0f172a);
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.iv-card-role {
    color: var(--color-primary, #1e40af);
    font-size: 1.2rem;
    font-weight: 700;
}

.iv-card-title {
    margin: 0;
    color: var(--color-text, #0f172a);
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.iv-card-link:hover .iv-card-title {
    color: var(--color-primary, #1e40af);
}

.iv-card-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    padding-top: 4px;
    color: var(--color-primary, #1e40af);
    font-size: 1.3rem;
    font-weight: 700;
}

.iv-card-more svg {
    transition: transform 0.3s ease;
}

.iv-card-link:hover .iv-card-more svg {
    transform: translateX(3px);
}

/* 横に並んだカードで「写真・氏名・タイトル・リンク」の高さをそろえる（subgrid 対応ブラウザ） */
@supports (grid-template-rows: subgrid) {
    .iv-grid {
        row-gap: 0;
    }

    .iv-card {
        display: grid;
        grid-row: span 4;
        grid-template-rows: subgrid;
        row-gap: 0;
        margin-bottom: 24px;
    }

    .iv-card-link {
        display: grid;
        grid-row: 1 / span 4;
        grid-template-rows: subgrid;
        row-gap: 0;
    }

    .iv-card-body {
        display: contents;
    }

    .iv-card .iv-card-image { grid-row: 1; }
    .iv-card .iv-card-person { grid-row: 2; margin: 18px 20px 0; }
    .iv-card .iv-card-title { grid-row: 3; margin: 12px 20px 0; }
    .iv-card .iv-card-more { grid-row: 4; align-self: end; margin: 14px 20px 22px; padding-top: 0; }
}

@media (max-width: 1100px) {
    .iv-grid,
    .iv-grid.is-3col {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .iv-grid,
    .iv-grid.is-3col {
        gap: 14px;
    }

    .iv-card-name {
        font-size: 1.5rem;
    }

    .iv-card-role {
        font-size: 1.1rem;
    }

    .iv-card-title {
        font-size: 1.3rem;
        line-height: 1.6;
    }

    .iv-card-more {
        gap: 3px;
        font-size: 1.15rem;
        white-space: nowrap;
    }

    .iv-card-more svg {
        width: 12px;
        height: 12px;
    }

    .iv-card-body {
        padding: 12px 12px 16px;
    }

    @supports (grid-template-rows: subgrid) {
        .iv-grid { row-gap: 0; }
        .iv-card { margin-bottom: 14px; }
        .iv-card .iv-card-person { margin: 12px 12px 0; padding-bottom: 8px; }
        .iv-card .iv-card-title { margin: 8px 12px 0; }
        .iv-card .iv-card-more { margin: 10px 12px 16px; }
    }
}
