/* =========================
   Footer STORY セクション（共通）
   ========================= */
.footer-story-block {
    background: #fff7f7;
    padding: 32px 0;
}

.footer-story-inner {
    width: min(1080px, 92%);
    margin: 0 auto;
    border: 4px solid #ff6030;
    border-radius: 16px;
    padding: 50px 32px;
}

@media (min-width: 768px) and (max-width: 1279px) {
    .footer-story-inner {
        width: 640px;
        padding: 32px 32px;
    }
}

@media (max-width: 767px) {
    .footer-story-inner {
        padding: 32px 20px;
    }
}


.footer-story-head {
    text-align: center;
    margin-bottom: 28px;
}

.footer-story-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0;
    display: inline-block;
    position: relative;
}

.footer-story-title::before {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: -40px;
    content: "";
    display: block;
    width: 25px;
    aspect-ratio: 1 / 1;
    background: url(../img/common/footer/fst-icon-01.png)no-repeat center center / contain;
}

.footer-story-title::after {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: -40px;
    content: "";
    display: block;
    width: 25px;
    aspect-ratio: 1 / 1;
    background: url(../img/common/footer/fst-icon-01.png)no-repeat center center / contain;
}

.footer-story-lead {
    margin: 1.5em 0 4em 0;
    line-height: 1.7;
}

/* セクション見出し・ラベル */
.footer-story-sec {
    position: relative;
    margin: 30px 0 30px 0;
}

.footer-story-sec-title {
    font-size: 1.125rem;
    font-weight: 800;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    line-height: 1.6;
}

@media (max-width: 767px) {
    .footer-story-sec-title {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 15px;
    }
}

.footer-story-sec-title::before {
    content: "";
    display: block;
    width: 53px;
    aspect-ratio: 1 / 1;
    background: url(../img/common/footer/fst-icon-02.png)no-repeat center center / contain;
    margin-bottom: 10px;
}

.footer-story-sec-title.ranking::before {
    background: url(../img/common/footer/fst-icon-03.png)no-repeat center center / contain;
}

@media (max-width: 767px) {
    .footer-story-sec-title::before {
        margin-bottom: 0px;
    }
}

/* リスト（PCはグリッド / SPはJSでスライダー化） */
.footer-story-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 20px;
}

.footer-story-sec--new .footer-story-list {
    grid-template-columns: repeat(3, 1fr);
}

.footer-story-sec--ranking .footer-story-list {
    grid-template-columns: repeat(5, 1fr);
}

/* SPではスライダーになるためdisplayはJS側でそのままblockでもOK */
@media (max-width: 1279px) {
    .footer-story-list {
        display: block;
    }
}

/* カード */
.footer-story-card {}

.footer-story-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.footer-story-thumb {
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #eee;
}

.footer-story-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.footer-story-card-title {
    margin: .6em 0 0;
    font-weight: 700;
    line-height: 1.5;
    font-size: clamp(14px, 1.6vw, 16px);
}

/* ランキング番号バッジ（サムネ左上） */
.footer-story-card--rank {
    position: relative;
}

.footer-story-badge {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: -19px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #ff6030;
    color: #ff6030;
    font-weight: 800;
    display: grid;
    place-items: center;
    font-size: 16px;
    z-index: 2;
}

/* 一覧ボタン */
.footer-story-more-wrap {
    text-align: center;
}

.footer-story-more {
    text-align: center;
    margin: 28px auto 0 auto;
}



@media(max-width: 767px) {
    .footer-story-more {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 260px;
        height: 57px;
        padding: 0 16px;
        overflow: hidden;
        font-size: 1rem;
        font-weight: bold;
        line-height: 1.125rem;
        text-align: center;
        background: #fff;
        border: 1px solid #ccc;
        margin: 22px auto 0 auto;
    }
}

@media(max-width: 767px)and (hover: hover) {
    .footer-story-more:hover {
        color: #fff;
        background: #f44b1e;
        border: 0
    }
}

@media(min-width: 768px)and (max-width: 1279px) {
    .footer-story-more {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 260px;
        height: 57px;
        padding: 0 16px;
        overflow: hidden;
        font-size: 1rem;
        font-weight: bold;
        line-height: 1.125rem;
        text-align: center;
        background: #fff;
        border: 1px solid #ccc;
        margin: 30px auto 0 auto;
    }
}

@media(min-width: 768px)and (max-width: 1279px)and (hover: hover) {
    .footer-story-more:hover {
        color: #fff;
        background: #f44b1e;
        border: 0
    }
}

@media(min-width: 1280px) {
    .footer-story-more {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 16.375rem;
        height: 51px;
        padding: 0 16px;
        overflow: hidden;
        font-size: 1rem;
        font-weight: bold;
        line-height: 1.125rem;
        text-align: center;
        background: #fff;
        border: 1px solid #ccc;
        margin: 40px auto 0 auto;
    }
}

@media(min-width: 1280px)and (hover: hover) {
    .footer-story-more:hover {
        color: #fff;
        background: #f44b1e;
        border: 0
    }
}


/* =========================
   独自スライダー（SPのみ有効）
   - JSで .is-slider / .is-peek が付与される
   - ドット中央、左右にPrev/Next矢印
   - 次スライドが少し見えるのはJSの幅計算で制御
   ========================= */
.footer-story-block .is-slider {
    position: relative;
    overflow: hidden;
    padding-top: 30px;
}

.footer-story-block .is-peek {
    padding-bottom: 24px;
    /* ドット＆矢印分の余白 */
}

/* トラック＆スライド */
.footer-story-block .footer-slider-track {
    display: flex;
    will-change: transform;
    touch-action: pan-y;
    /* 縦スクロール優先 */
    cursor: grab;
}

.footer-story-block .footer-slider-track.is-dragging {
    cursor: grabbing;
}

.footer-story-block .footer-slider-slide {
    flex: 0 0 auto;
    /* 幅はJSで指定（peek対応） */
}

/* コントロール（Prev/ドット/Next を一列に） */
.footer-story-block .footer-slider-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
}

/* 矢印 */
.footer-story-block .footer-slider-arrow {
    width: 32px;
    height: 32px;
    border: 1px solid #111;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    font-size: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.footer-story-block .footer-slider-prev::before,
.footer-story-block .footer-slider-next::before {
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    border-top: 2px solid #111;
    border-right: 2px solid #111;
    transform-origin: center;
}

.footer-story-block .footer-slider-prev::before {
    transform: rotate(-135deg);
    /* ← */
}

.footer-story-block .footer-slider-next::before {
    transform: rotate(45deg);
    /* → */
}

/* ドット */
.footer-story-block .footer-slider-dots {
    display: flex;
    gap: 8px;
}

.footer-story-block .footer-slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #bbb;
    border: none;
    padding: 0;
    cursor: pointer;
}

.footer-story-block .footer-slider-dot.is-active {
    background: #ff6030;
}

/* PCではスライダーのコントロールを非表示（PCはグリッドで見せる） */
@media (min-width: 1280px) {
    .footer-story-block .footer-slider-controls {
        display: none !important;
    }
}

/* =========================
   細かな整え（任意）
   ========================= */
/* ラベルと見出しの縦位置微調整（SP） */
@media (max-width: 1279px) {
    .footer-story-sec-title {
        text-align: center;
    }

}

/* PC幅に戻ったら必ずグリッドへ（保険） */
@media (min-width: 1280px) {

    .footer-story-sec--new .footer-story-list,
    .footer-story-sec--ranking .footer-story-list {
        display: grid !important;
        /* SPで display:block から戻す */
        transform: none !important;
        /* 念のため */
        width: auto !important;
    }

    .footer-story-list>li {
        width: auto !important;
        margin-right: 0 !important;
        /* グリッドは gap で管理 */
    }
}

/* ===== PC(≥1280px)：タイトル（＋ラベル）を左、リストを右に配置 ===== */
@media (min-width: 1280px) {

    /* セクション全体を2カラムに */
    .footer-story-sec {
        display: grid;
        grid-template-columns: 20% 1fr;
        /* 左：タイトル列 / 右：カードグリッド */
        grid-template-rows: auto auto;
        column-gap: 24px;
        align-items: start;
        margin: 30px 0 60px 0;
    }

    .footer-story-title {
        font-size: 1.5rem;
    }

    /* 見出しを左カラムに・左マージンをリセット */
    .footer-story-sec-title {
        margin: 0;
        font-size: 22px;
        text-align: center;
    }

    /* リストは右カラムで上下2行ぶち抜き */
    .footer-story-list {
        grid-column: 2;
        grid-row: 1 / span 2;
        display: grid !important;
        /* PC時は常にグリッド */
        gap: 20px;
    }

    /* 既存列数指定は維持（必要なら調整） */
    .footer-story-sec--new .footer-story-list {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-story-sec--ranking .footer-story-list {
        grid-template-columns: repeat(5, 1fr);
    }
}