@charset "utf-8";

/* =========================================
   モデルコース詳細（下層）
   ========================================= */
.detail {
    padding-top: calc(var(--header-h) + 75px);
}

/* ---- ヒーロー ---- */
.detail-hero {
    position: relative;
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 24px;
}

.detail-hero .breadcrumb {
    position: static;
    transform: none;
    display: block;
    margin: 0 auto 55px;
    max-width: 1100px;
    width: calc(100vw - 500px);
}

.detail-hero__frame {
    position: relative;
    border-radius: 40px;
    overflow: hidden;
    background: #fff;
}

.detail-hero__head {
    background: var(--green);
    color: #fff;
    padding: 30px 50px 34px;
}

.detail-hero__no {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.detail-hero__title {
    margin-top: 8px;
    font-size: clamp(28px, 3vw, 44px);
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: 0.04em;
}

.detail-hero__img {
    line-height: 0;
}

.detail-hero__img img {
    width: 100%;
    /* aspect-ratio: 1450 / 500; */
    height: 500px;
    object-fit: cover;
    display: block;
}

/* ヒーロー内・浮遊する情報ボックス */
.detail-hero__info {
    position: absolute;
    right: 34px;
    bottom: 36px;
    width: 400px;
    max-width: 42%;
    background: #fff;
    border-radius: 20px;
    padding: 26px 30px 30px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.detail-hero__lead {
    color: var(--ink);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.75;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}

/* 情報テーブル（上＋左のグリーンライン） */
.detail-spec {
    border-top: 1.5px solid var(--green);
    border-left: 5px solid var(--green);
    border-bottom: 1.5px solid var(--green);
    padding: 10px 0 10px 16px;
}

.detail-spec dl {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 20px;
    row-gap: 4px;
}

.detail-spec dt,
.detail-spec dd {
    color: var(--green);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.6;
}

.detail-spec dd {
    display: flex;
    align-items: center;
}

.detail-spec .stars {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.detail-spec .stars img {
    width: 17px;
    height: 17px;
}

/* =========================================
   タイムライン（スライダー）
   ========================================= */
.timeline {
    position: relative;
    margin-top: 90px;
}

.timeline__viewport {
    overflow-x: auto;
    scrollbar-width: none;
    scroll-behavior: smooth;
    cursor: grab;
}

.timeline__viewport img {
    pointer-events: none;
}

.timeline__viewport.is-grabbing {
    cursor: grabbing;
    scroll-behavior: auto;
    user-select: none;
}

.timeline__viewport::-webkit-scrollbar {
    display: none;
}

.timeline__track {
    display: inline-flex;
    align-items: stretch;
    gap: 0;
    /* 左：1つ目のカード(716px)がビューポート中央に来るように */
    padding-left: max(24px, calc(50% - 358px));
    /* 右：スクロール終端で最後の要素の右端が .timeline__foot（max-width:1500px / padding:0 24px）の右端に揃うように */
    padding-right: max(24px, calc(50% - 726px));
    align-items: center;
}

/* スポットカード */
.spot {
    flex: 0 0 auto;
    width: 716px;
    display: flex;
    gap: 26px;
    background: #e8e8e8;
    border-radius: 30px;
    padding: 30px;
}

.spot__left {
    flex: 0 0 315px;
}

.spot__name {
    position: relative;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.125;
    letter-spacing: 0.02em;
    padding: 5px 30px 5px 18px;
    min-height: 53px;
    display: flex;
    align-items: center;
}

.spot__name p {
    position: relative;
    z-index: 1;
}

.spot__name::before {
    content: "";
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background: var(--green);
    clip-path: polygon(0 0, 100% 0, calc(100% - 20px) 50%, 100% 100%, 0 100%);
}

.spot__name::after {
    content: "";
    position: absolute;
    left: 0;
    top: 100%;
    width: 8px;
    height: 15px;
    background: var(--yellow);
}

.spot__photo {
    margin-top: 18px;
    border-radius: 14px;
    overflow: hidden;
    line-height: 0;
    aspect-ratio: 300 / 250;
}

.spot__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.spot__right {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.spot__stay {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--green);
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 14px;
}

.spot__stay img {
    width: 22px;
    height: 22px;
}

.spot__stay .label {
    font-weight: 500;
}

.spot__desc {
    color: var(--ink);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.625;
    letter-spacing: -0.01em;
    margin-bottom: 15px;
}

.spot__contact {
    margin-top: auto;
    background: #fff;
    border-radius: 14px;
    padding: 18px 22px;
    display: grid;
    gap: 10px;
}

.spot__contact p {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: var(--green);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
}

.spot__contact img {
    flex: 0 0 auto;
    margin-top: 2px;
}

.spot__contact .ic-tel {
    width: 15px;
}

.spot__contact .ic-pin {
    width: 14px;
}

/* 写真なしカード（レンタル返却など）：1カラム・テキスト左寄せ・自転車中央 */
.spot--note {
    flex-direction: column;
    gap: 30px;
    width: 385px;
}

.spot--note .spot__left {
    flex: 0 0 auto;
    width: 100%;
}

.spot--note .spot__stay {
    margin-bottom: 0;
}

.spot--note .spot__return {
    margin-top: 16px;
    color: var(--ink);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.6;
}

.spot--note .spot__return img {
    display: block;
    width: 42px;
    margin: 16px auto 0;
}

/* コネクター（>>> ◯ >>>） */
.link {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 6px;
}

.link__chev {
    display: inline-flex;
    gap: 6px;
}

.link__chev span {
    width: 9px;
    height: 15px;
    background: url(../img/arrow_green.svg) center / contain no-repeat;
}

.link__circle {
    flex: 0 0 auto;
    width: 74px;
    height: 74px;
    border: 2px solid var(--green);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    background: #fff;
}

.link__circle img {
    height: 20px;
}

.link__circle .ic-walk {
    height: 22px;
}

.link__time {
    color: var(--green);
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
}

/* GOAL */
.goal {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    align-self: center;
}

.goal__label {
    color: var(--green);
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 0.08em;
    margin-bottom: 10px;
}

.goal__circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: var(--green);
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.goal__circle .goal__station {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.goal__circle img {
    height: 46px;
}

/* ---- フット：シーケンスバー＋操作ボタン ---- */
.timeline__foot {
    display: flex;
    align-items: center;
    gap: 40px;
    max-width: 1500px;
    margin: 40px auto 0;
    padding: 0 24px;
}

.seq {
    position: relative;
    flex: 1 1 auto;
}

.seq__track {
    position: relative;
    height: 7px;
    border-radius: 4px;
    background: rgba(0, 109, 11, 0.22);
}

.seq__fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    border-radius: 4px;
    background: var(--green);
    transition: width 0.1s linear;
}

.seq__bike {
    position: absolute;
    bottom: 8px;
    left: 0;
    width: 40px;
    transition: left 0.1s linear;
}

.timeline__controls {
    flex: 0 0 auto;
    display: flex;
    gap: 18px;
}

.timeline__btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--green);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    border: solid 2px var(--green);
}

.timeline__btn::before {
    content: "";
    width: 12px;
    height: 12px;
    border-top: 2.5px solid #fff;
    border-right: 2.5px solid #fff;
    transition: all 0.3s;
}
@media (hover: hover) {
    .timeline__btn:hover {
        background: #fff;
    }
    .timeline__btn:hover::before {
        border-color: var(--green);
    }
}

.timeline__btn--prev::before {
    transform: rotate(-135deg);
    margin-left: 4px;
}

.timeline__btn--next::before {
    transform: rotate(45deg);
    margin-right: 4px;
}

/* =========================================
   関連コース（左右矢印＋2カード）
   ========================================= */
.related {
    position: relative;
    max-width: 1360px;
    margin: 120px auto 0;
    padding: 0 90px;
}

/* slickスライダー */
.related__slider {
    /* FOUC対策：初期化前は1枚目だけ表示 */
    display: flex;
    overflow: hidden;
}

.related__slider.slick-initialized {
    display: block;
    overflow: visible;
}

.related__slider:not(.slick-initialized) .related__slide {
    flex: 0 0 50%;
}

.related__slide {
    padding: 0 15px;
    box-sizing: border-box;
}

/* slickの各スライドの高さを揃える */
.related__slider .slick-track {
    display: flex;
}

.related__slider .slick-slide {
    height: auto;
}

.related__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    /* slickが自動付与する display:inline-block を打ち消してチェブロンを中央に保つ */
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
}

.related__arrow:hover {
    opacity: 0.55;
}

.related__arrow::before {
    content: "";
    width: 17px;
    height: 30px;
    background: url(../img/arrow_green.svg) center / contain no-repeat;
}

.related__arrow--prev {
    left: 20px;
}

.related__arrow--prev::before {
    transform: rotate(180deg);
}

.related__arrow--next {
    right: 20px;
}

/* 一覧へ戻るボタン */
.back-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 340px;
    height: 76px;
    margin: 56px auto 0;
    border-radius: 9999px;
    background: var(--green);
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-indent: 0.1em;
    border: solid 2px var(--green);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.18);
    transition: all 0.3s;
}

.back-btn__arrow {
    position: absolute;
    right: 34px;
    top: 50%;
    transform: translateY(-50%);
    width: 15px;
    aspect-ratio: 16 / 29;
    background: url(../img/arrow_white.svg) center / contain no-repeat;
    transition: all 0.3s;
}

.course-card__title {
    display: flex;
    align-items: center;
}

@media (hover: hover) {
    .back-btn:hover {
        background: #fff;
        color: var(--green);
        border: solid 2px var(--green);
    }

    .back-btn:hover .back-btn__arrow {
        background-image: url(../img/arrow_green.svg);
    }
}

@media screen and (max-width: 1024px) {
    .detail {
        padding-top: calc(var(--header-h) + 110px);
    }

    .detail-hero .breadcrumb {
        width: 100%;
        margin-bottom: 40px;
    }
}

/* =========================================
   SP（〜768px）：タイムラインを縦積みに
   ========================================= */
@media screen and (max-width: 768px) {
    .detail {
        padding-top: calc(var(--header-h) + 24px);
    }

    .detail-hero {
        padding: 0;
    }

    .detail-hero .breadcrumb {
        margin-bottom: 12px;
        font-size: 13px;
        width: calc(100% - 60px);
    }

    .detail-hero__frame {
        border-radius: 0;
    }

    .detail-hero__head {
        padding: 20px 30px;
    }

    .detail-hero__title {
        font-size: 22px;
    }

    .detail-hero__no {
        font-size: 14px;
    }

    .detail-hero__img img {
        height: 340px;
        border-radius: 0 0 18px 18px;
    }

    /* 情報ボックスは画像の下に通常配置 */
    .detail-hero__info {
        position: static;
        width: 100%;
        max-width: none;
        border-radius: 0 0 18px 18px;
        box-shadow: none;
        padding: 20px 30px;
    }

    .detail-hero__lead {
        font-size: 14px;
    }

    /* スペック表：SPは「走行距離 …／所要時間 …」を1行、難易度を次行に */
    .detail-spec {
        padding: 11px 14px 11px 16px;
    }

    .detail-spec dl {
        display: block;
    }

    .detail-spec dt,
    .detail-spec dd {
        display: inline;
        font-size: 13px;
        line-height: 1.9;
    }

    .detail-spec dt {
        margin-right: 5px;
    }

    .detail-spec dt:nth-of-type(2)::before {
        content: "／";
    }

    .detail-spec dt:nth-of-type(3)::before {
        content: "\A";
        white-space: pre;
    }

    .detail-spec dd .stars {
        vertical-align: -3px;
    }

    /* タイムライン：縦積み */
    .timeline {
        margin-top: 48px;
    }

    .timeline__viewport {
        overflow: visible;
        cursor: auto;
    }

    .timeline__track {
        flex-direction: column;
        align-items: stretch;
        padding: 0;
    }

    .spot {
        width: 100%;
        flex-direction: column;
        gap: 16px;
        border-radius: 18px;
        padding: 20px 30px;
    }

    .spot__name::before {
        clip-path: polygon(
            0 0,
            100% 0,
            calc(100% - 15px) 50%,
            100% 100%,
            0 100%
        );
    }

    .spot__left {
        flex: 0 0 auto;
    }

    .spot__photo {
        aspect-ratio: 315 / 175;
        margin-top: 14px;
    }

    /* .spot__contact {
        margin-top: 20px;
    } */

    /* コネクターを縦向きに */
    .link {
        flex-direction: column;
        align-self: center;
        gap: 8px;
        padding: 14px 0;
        width: calc(100% - 60px);
        max-width: 350px;
    }

    .link__chev {
        flex-direction: column;
        gap: 0;
    }

    .link__chev span {
        transform: rotate(90deg);
    }

    /* チェブロンは上下2つずつ */
    .link__chev span:nth-child(3) {
        display: none;
    }

    /* 円 → 横長ピル（時間が左・アイコンが右） */
    .link__circle {
        width: 100%;
        height: 55px;
        min-width: 128px;
        flex-direction: row-reverse;
        justify-content: center;
        gap: 40px;
        padding: 0 22px;
        border-radius: 9999px;
    }

    .link__time {
        font-size: 15px;
    }

    /* GOAL */
    .goal {
        align-self: center;
        margin-top: 4px;
    }

    .goal__circle {
        width: 120px;
        height: 120px;
    }

    /* SPではシーケンスバー・操作ボタンは非表示 */
    .timeline__foot {
        display: none;
    }

    /* 関連コース：slick 1枚表示 */
    .related {
        max-width: 600px;
        margin: 64px auto 0;
        padding: 0;
    }

    .related__slide {
        padding: 0 30px;
    }

    .related__arrow {
        width: 10px;
        height: 20px;
    }

    .related__arrow--prev {
        left: 10px;
    }
    .related__arrow--next {
        right: 10px;
    }

    .related__slider:not(.slick-initialized) .related__slide {
        flex: 0 0 100%;
    }

    .back-btn {
        width: 100%;
        max-width: 315px;
        height: 60px;
        font-size: 18px;
        margin-top: 40px;
    }
}
