/* ====================================================================
   pr_page → staff_item 掲載バナー 専用スタイル
   --------------------------------------------------------------------
   ・読み込み: inc_functions/pr_page/staff_item_banner.php の
     wp_enqueue_scripts フック（staff_item 単体 / category_item アーカイブ）
   ・sc-hero（blocks/sc-hero/style.css）と pr base.css のデザイントークンを
     「踏襲」する。ただし base.css はグローバルリセット
     （img { width:100%; object-fit:cover } 等）を含み staff_item ページの
     画像を破壊するため読み込まない。必要なトークンのみ .staff-pr-banners に
     スコープして自己完結させる。
   ・動的な背景画像（Hero 画像）は PHP 側の inline style で付与する。
   ==================================================================== */

/* ── sc-hero / base.css と同値のデザイントークン（デフォルト値）──────
   pr_page の pr_theme（acoustic / sapphire 等）が選択されている場合は、
   各バナー（.staff-pr-banners__link）に付与される .pr-theme--{slug} が
   これらの変数を上書きする（テーマCSSを enqueue して踏襲）。
   ※ デフォルトテーマのバナーはこのセクションの値を継承して使う。 */
.staff-pr-banners {
    --bb-black:        #0c0c0c;
    --bb-white:        #ffffff;
    --bb-gray:         #888888;
    --bb-gray-light:   #bbbbbb;
    --bb-accent:       #e8547a;
    --bb-font-display: 'Bebas Neue', sans-serif;
    --bb-font-body:    'Noto Sans JP', sans-serif;
    --bb-font-mono:    'DM Mono', monospace;
    --bb-radius-md:    10px;

  padding: 0 1rem 3rem 1rem;
}

.staff-pr-banners .container {
    max-width: 1500px;
    margin-inline: auto;

}

/* 1カラム・センタリング */
.staff-pr-banners__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.staff-pr-banners__item {
    width: 100%;
    max-width: 750px;
    /* 中央寄せ（1カラム時 / 単体時）*/
    margin-inline: auto;
}

/* バナー本体:
   - モバイル: aspect-ratio 解除。高さは内容（テキスト）依存で可変。
   - PC(>=768px): 横750 × 縦375 固定（下の @media で aspect-ratio を付与）。 */
.staff-pr-banners__link {
    position: relative;
    display: block;
    /* 幅は親（カラム/アイテム）に追従。固定はしない（A案）。 */
    width: 100%;
    border-radius: var(--bb-radius-md);
    overflow: hidden;
    text-decoration: none;
    background-color: var(--bb-black);
    /* Hero 画像を背景に cover（URL は inline style で付与）*/
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform .2s ease, box-shadow .2s ease;
    /* font-family は theme クラス（.pr-theme--*）を持つこの要素で解決させる。
       section に置くと継承プロパティ内の var() がテーマ変数で再解決されない。 */
    font-family: var(--bb-font-body);
}

.staff-pr-banners__link:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(0, 0, 0, .28);
    text-decoration: none;
}

/* sc-hero の背景装飾を踏襲: ピンクの放射状グロー（::before）+ グリッド（::after）。
   どちらも z-index:0（オーバーレイ z-index:1 の下）で、overflow:hidden により角丸内にクリップ。 */
.staff-pr-banners__link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 60% at 70% 40%, rgba(232, 84, 122, .1) 0%, transparent 60%),
        radial-gradient(ellipse 50% 80% at 10% 80%, rgba(232, 84, 122, .05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.staff-pr-banners__link::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

/* ── 楽器画像レイヤー（classic: sc-hero の踏襲）──────────────────
   高さ基準で全体が収まるよう object-fit: contain。右側に3点オーバーラップ。 */
.staff-pr-banners__instruments {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.staff-pr-banners__instrument {
    position: absolute;
    top: 50%;
    height: 86%;
    width: 38%;
    object-fit: contain;
    object-position: center bottom;
    filter: drop-shadow(0 12px 28px rgba(0, 0, 0, .45));
}

.staff-pr-banners__instrument--1 {
    right: 30%;
    transform: translateY(-50%) rotate(-5deg);
}

.staff-pr-banners__instrument--2 {
    right: 15%;
    transform: translateY(-50%) rotate(1deg);
}

.staff-pr-banners__instrument--3 {
    right: 1%;
    transform: translateY(-50%) rotate(5deg);
}

/* 暗いオーバーレイで文字を読みやすく（左を濃く）
   モバイルでは通常フロー（position:relative）にして、この要素の高さが
   バナーの高さを決める（aspect-ratio 解除のため）。PC では absolute で全面に。 */
.staff-pr-banners__overlay {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    padding: 1rem;
    background: linear-gradient(90deg,
            rgba(12, 12, 12, .88) 0%,
            rgba(12, 12, 12, .66) 50%,
            rgba(12, 12, 12, .30) 100%);
}

/* instruments モードは右側の楽器を見せるため、右半分を透過させる */
.staff-pr-banners__link--instruments .staff-pr-banners__overlay {
    background: linear-gradient(90deg,
            var(--bb-black) 0%,
            rgba(12, 12, 12, .85) 32%,
            rgba(12, 12, 12, 0) 62%);
}

.staff-pr-banners__body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    //max-width: 72%;
    color: var(--bb-white);
}

/* アイブロウ: sc-eyebrow と同様 mono + gray */
.staff-pr-banners__eyebrow {
    font-family: var(--bb-font-mono);
    font-size: 11px;
    letter-spacing: .1em;
    color: var(--bb-gray-light);
}

/* 見出し: bsc-hero__title と同様 display フォント + white、アクセントは accent */
.staff-pr-banners__title {
    font-family: var(--bb-font-display);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: .01em;
    color: var(--bb-white);
}

.staff-pr-banners__title .is-accent {
    color: var(--bb-accent);
    font-style: normal;
}

/* サブタイトル: bsc-hero__subtitle と同様 gray-light。高さに収めるため2行 */
.staff-pr-banners__subtitle {
    font-size: 12px;
    line-height: 1.7;
    color: var(--bb-gray-light);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.staff-pr-banners__more {
    margin-top: 4px;
    font-size: 13px;
    font-weight: 700;
    color: var(--bb-accent);
}

@media (min-width: 768px) {

    /* 768〜1023px: 1カラム（中央・最大750px）。2:1 を維持しても 750×375 まで
       使えるためテキストが欠けない。2カラム化は 1024px 以上で行う（下の @media）。 */
    .staff-pr-banners__link {
        aspect-ratio: 750 / 375;
    }

    /* PC: オーバーレイを全面に重ねる */
    .staff-pr-banners__overlay {
        position: absolute;
        inset: 0;
        padding: 36px 44px;
    }

    .staff-pr-banners__body {
        gap: 10px;
        //max-width: 62%;
    }

    .staff-pr-banners__title {
        font-size: 28px;
    }

    .staff-pr-banners__subtitle {
        font-size: 13px;
    }
}

/* 1024px〜: バナーが複数あるときだけ2カラム。
   カラムが狭くなる分、2:1 固定だと高さが足りずテキストが欠けるため、
   2カラム側はアスペクト比固定を解除し、高さを内容依存にする（欠け防止）。
   単体（中央1枚）は従来どおり 2:1（750×375）を維持。 */
@media (min-width: 1024px) {
    .staff-pr-banners__list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px;
        align-items: stretch;
        justify-items: center;
    }

    /* 1枚だけのときは2カラム分をまたいで中央に1つ（2:1 維持） */
    .staff-pr-banners__item:only-child {
        grid-column: 1 / -1;
    }

    /* 2カラム時（複数枚）: 高さは内容依存にして上下の欠けを防止 */
    .staff-pr-banners__item:not(:only-child) {
        height: 100%;
    }

    .staff-pr-banners__item:not(:only-child) .staff-pr-banners__link {
        aspect-ratio: auto;
        height: 100%;
    }

    .staff-pr-banners__item:not(:only-child) .staff-pr-banners__overlay {
        position: relative;
        inset: auto;
    }

    /* 2カラムはカード幅が狭いので見出しを少し小さく */
    .staff-pr-banners__item:not(:only-child) .staff-pr-banners__title {
        font-size: 22px;
    }
}

@media (min-width: 1200px) {
    .staff-pr-banners .container {
        padding-inline: 64px;
    }
}
