/*==================================================
 TOUR COURSE
==================================================*/

.tour-course{
    position:relative;
    max-width:1200px;
    margin:30px auto 0;
    padding:0 30px;
    background:#edf6ff;
    border-radius:32px;
}


/*======================================
 タイムライン（PC基準）
======================================*/

.tour-course__line {
    position: absolute;
    left: 87px; /* (120px - 6px)/2 + 30px = 87px */
    top: 130px;
    bottom: 110px;
    width: 6px;
    background: #78b7ef;
    border-radius: 10px;
}


/*======================================
 START
======================================*/

.tour-start{
    position:relative;
    padding-top:20px;
    margin-bottom:20px; /* STARTと直下の到着（苫小牧港着）の間隔 */
}

.tour-start,
.tour-arrival,
.tour-day,
.tour-move,
.tour-spot,
.tour-goal {
    display: grid;
    grid-template-columns: 120px 1fr;
    column-gap: 30px;
    align-items: center;
}

.tour-start__circle {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: #005baa;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    font-weight: bold;
    z-index: 2;
    overflow: hidden;
}

/* 内側の点線装飾 */
.tour-start__circle::before {
    content: "";
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    border: 2px dotted rgba(255, 255, 255, 0.75);
    pointer-events: none;
}

/* START内の1日目帯の位置調整 */
.tour-start .tour-day {
    margin: 0;
    grid-column: 2;
    width: 100%;
}

.tour-start .tour-day span {
    width: 100%;
    box-sizing: border-box; /* 幅の計算を正しく揃える */
}
/* START内の 1日目 帯の調整 */
.tour-start .tour-day-bar {
    grid-column: 2; /* 確実に2列目に配置 */
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 50px;
    color: #fff;
    font-size: 22px;
    font-weight: bold;
    background: linear-gradient(90deg, #74b2eb, #7cbaf0);
    box-sizing: border-box;
}

/*======================================
 時間バー
======================================*/

.tour-time{
    display:flex;
    width:100%;
    border-radius:30px;
    overflow:hidden;
    background:#fff;
    box-shadow:0 5px 15px rgba(0,0,0,.08);
}

.tour-time__time{
    width:140px;
    flex-shrink:0;
    text-align:center;
    color:#fff;
    padding:12px;
    background:#65c3df;
    display:flex;
    align-items:center;
    justify-content:center;
}

.tour-time__text{
    flex:1;
    padding:12px 20px;
    display:flex;
    align-items:center;
}


/*======================================
 移動
======================================*/

.tour-move{
    margin:35px 0;
}

.tour-icon {
    width: 46px;
    height: 46px;
    margin: 0 auto;
    border-radius: 50%;
    background-color: #65c3df;
    background-position: center;
    background-repeat: no-repeat;
    background-size: 24px 24px; /* アイコンのサイズ */
    z-index: 2;
}

/* クラスによるアイコン画像の切り替え */
.tour-icon.is-car {
    background-image: url("/route/tourism/img/icon-car.svg");
}

.tour-icon.is-walk {
    background-image: url("/route/tourism/img/icon-walk.svg");
}

.tour-icon.is-train {
    background-image: url("/route/tourism/img/icon-train.svg");
}

.tour-icon.is-bus {
    background-image: url("/route/tourism/img/icon-bus.svg");
}

.tour-move p{
    margin:0;
    font-weight:600;
}


/*======================================
 到着
======================================*/

.tour-arrival{
    margin:20px 0 40px;
}


/*======================================
 DAYバー（1日目・2日目共通）
======================================*/

.tour-day {
    display: grid;
    grid-template-columns: 120px 1fr;
    column-gap: 30px;
    align-items: center;
    margin: 50px 0;
}

.tour-day span {
    grid-column: 2; /* 確実に右側の2列目に配置 */
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 50px;
    color: #fff;
    font-size: 22px;
    font-weight: bold;
    background: linear-gradient(90deg, #74b2eb, #7cbaf0);
    box-sizing: border-box;
}

/*======================================
 スポット全体
======================================*/

.tour-spot{
    align-items:flex-start;
    margin-bottom:70px;
}

.tour-number{
    width:46px;
    height:46px;
    margin:0 auto;
    border-radius:50%;
    background:#005baa;
    color:#fff;
    display:flex;
    justify-content:center;
    align-items:center;
    font-size:22px;
    font-weight:bold;
    z-index:2;
}


/*==================================================
 CARD (PC表示)
==================================================*/

.tour-card{
    display:grid;
    grid-template-columns: 6fr 4fr;
    gap:40px;
    align-items: start;
    padding:35px;
    margin-bottom:0;
    background:#fff;
    border-radius:28px;
    box-shadow:0 8px 15px rgba(0,0,0,.08);
}

.tour-card:hover {
    transform: none;
    box-shadow: 0 8px 15px rgba(0,0,0,.08);
}


/*==================================================
 LEFT
==================================================*/

.tour-card__content{
    display:flex;
    flex-direction:column;
}

.tour-card__time{
    display:inline-block;
    width:max-content;
    padding:8px 18px;
    margin-bottom: 20px;
    border-radius:30px;
    background:#64c6e7;
    color:#fff;
    font-weight:500;
    font-size:15px;
}

.tour-card__time::before,
.tour-time__time::before {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 6px;
    vertical-align: -3px;
    border-radius: 50%;
    background-color: #fff;
    background-image: url("/route/tourism/img/icon-time.svg");
    background-size: 12px 12px;
    background-position: center;
    background-repeat: no-repeat;
    flex-shrink: 0;
}

.tour-card h2{
    margin:0;
    font-size:34px;
    line-height:1.45;
    color:#005baa;
    font-weight: bold;
}

.tour-card h2::after{
    content:"";
    display:block;
    width:52px;
    height:3px;
    margin-top:18px;
    background:#64c6e7;
}

.tour-card h3{
    margin:15px 0 10px;
    font-size:20px;
    line-height:1.7;
    font-weight: bold;
}


/*==================================================
 BUTTON
==================================================*/

.tour-btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:10px;
    width:220px;
    height:56px;
    margin-top:35px;
    border-radius:40px;
    background:#005baa;
    color:#fff;
    text-decoration:none;
    font-weight:bold;
    transition:.3s;
}

.tour-btn::after{
    content:"→";
    transition:.3s;
}

.tour-btn:hover{
    background:#0074d4;
}

.tour-btn:hover::after{
    transform:translateX(6px);
}


/*==================================================
 GALLERY（モデルコース用・提供クレジット対応）
==================================================*/

.tour-gallery {
    display: flex;
    flex-direction: column;
    margin-top: 0;
    padding-top: 0;
}

/* メイン画像の親枠（右下クレジット配置基準） */
.tour-gallery__main-wrap {
    position: relative;
    width: 100%;
    display: block;
}

.tour-gallery__main {
    width: 100%;
    aspect-ratio: 16 / 10;
    height: auto;
    object-fit: cover;
    border-radius: 18px;
    display: block;
    margin-top: 0;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    transition: opacity .25s;
}

.tour-gallery__main.is-change {
    opacity: .35;
}

/* 提供テキストラベル */
.tour-gallery__provider {
    position: absolute;
    right: 12px;
    bottom: 12px;
    background-color: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 11px;
    line-height: 1.2;
    padding: 4px 8px;
    border-radius: 4px;
    pointer-events: none;
    z-index: 2;
    transition: opacity .25s ease;
}

/* 提供文言が空のときは全非表示 */
.tour-gallery__provider:empty {
    display: none;
}

.tour-gallery__thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 18px;
}

.tour-gallery__thumbs img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 12px;
    cursor: pointer;
    border: 3px solid transparent;
    transition: .25s;
    box-sizing: border-box;
}

.tour-gallery__thumbs img:hover {
    transform: translateY(-3px);
}

.tour-gallery__thumbs img.is-active {
    border-color: #64c6e7;
}

.tour-card > * {
    min-width: 0;
}


/*======================================
 GOAL
======================================*/

.tour-goal {
    display: grid;
    grid-template-columns: 120px 1fr;
    column-gap: 30px;
    align-items: center;
    position: relative;
    margin-top: 50px;
}

.tour-goal__circle {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: #FF5500;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    font-weight: bold;
    z-index: 2;
    overflow: hidden;
}

.tour-goal__circle::before {
    content: "";
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    border: 2px dotted rgba(255, 255, 255, 0.75);
    pointer-events: none;
}


/*==================================================
 PC表示専用（769px以上）
==================================================*/

@media (min-width: 769px) {
    .tour-gallery {
        margin-top: 55px !important; /* h2のテキストの頭と揃える */
    }
}


/*==================================================
 1200px以下
==================================================*/

@media (max-width:1200px){
    .tour-course{
        padding:0 20px 60px;
    }
    .tour-course__line{
        left: 77px; /* (120px - 6px)/2 + 20px = 77px */
    }
    .tour-card{
        grid-template-columns:6fr 4fr;
        gap:30px;
    }
    .tour-card h2{
        font-size:32px;
    }
}


/*==================================================
 992px以下（タブレット）
==================================================*/

@media (max-width:992px){
    .tour-start,
    .tour-arrival,
    .tour-day,
    .tour-move,
    .tour-spot,
    .tour-goal {
        grid-template-columns: 80px 1fr; /* タブレット時は円に合わせて1列目を80pxに縮小 */
        column-gap: 20px;
    }

    .tour-start__circle,
    .tour-goal__circle {
        width: 80px;
        height: 80px;
        font-size: 20px;
    }

    .tour-course__line{
        left: 57px; /* (80px - 6px)/2 + 20px = 57px */
    }

    .tour-time{
        margin-left:0;
        width:100%;
    }
    .tour-arrival,
    .tour-day,
    .tour-spot{
        margin-left:0;
    }
    .tour-number{
        width:40px;
        height:40px;
        font-size:18px;
    }
    .tour-icon{
        width:40px;
        height:40px;
    }
}


/*==================================================
 768px以下（スマホ対応）
==================================================*/

@media (max-width:768px){
    .tour-course{
        margin: 40px 0 !important;       /* 左右のmarginを0にして横幅100%化 */
        padding: 0 10px 40px !important; /* 左右のpaddingを15pxから10pxに縮小 */
        border-radius: 0 !important;
    }

    /* タイムラインの位置調整（スマホ基準） */
    .tour-course__line{
        left: 35px !important; /* (56px - 6px)/2 + 15px = 40px */
        top: 68px;
        bottom: 85px;
    }

    .tour-start,
    .tour-arrival,
    .tour-day,
    .tour-move,
    .tour-spot,
    .tour-goal {
        grid-template-columns: 56px 1fr;
        column-gap: 8px;
    }

    /* DAYバー（1日目・2日目など全ての帯サイズを完全に統一） */
    .tour-start .tour-day-bar,
    .tour-day span {
        grid-column: 2 !important;
        width: 100% !important;
        height: 40px !important;          /* 高さを揃える */
        font-size: 16px !important;       /* 文字サイズを揃える */
        padding: 0 !important;
        margin: 0 !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        box-sizing: border-box !important;
    }

    .tour-start,
    .tour-goal {
        align-items: center; /* スマホでも中央揃えに変更 */
    }

    .tour-start__circle,
    .tour-goal__circle {
        width: 56px;
        height: 56px;
        font-size: 13px;
    }

    .tour-time{
        flex-direction: column;
        width: 100%;
        margin-left: 0;
        border-radius: 16px;
    }

    .tour-time__time{
        width: 100%;
        min-width: 0;
        padding: 10px;
    }

    .tour-time__text{
        padding: 12px;
        font-size: 14px;
    }

    .tour-icon {
        width: 34px;
        height: 34px;
        background-size: 18px 18px; /* スマホ時のアイコンサイズ調整 */
    }
    
    .tour-move p{
        margin-left: 0;
        font-size: 14px;
    }

    .tour-day{
        margin-left: 0;
        margin-top: 30px;
        margin-bottom: 30px;
        width: 100%;
        height: auto !important;
    }

    .tour-spot{
        margin-left: 0;
    }

    .tour-number{
        width: 30px;
        height: 30px;
        font-size: 15px;
    }

    /* --------------------------------------------------
        カード内の要素並び替え（h2 → 画像 → h3 → 本文 → ボタン）
    -------------------------------------------------- */

    .tour-card {
        display: grid !important;
        grid-template-columns: 1fr !important;
        position: relative !important;
        overflow: hidden !important;
        padding: 16px 12px !important;
        border-radius: 12px !important;
    }

    /* 時間の青帯 */
    .tour-card__time {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 10px 0 !important;
        border-radius: 0 !important;
        background: #65c3df !important;
        color: #fff !important;
        text-align: center !important;
        font-size: 14px !important;
        font-weight: bold !important;
        z-index: 2 !important;
    }

    .tour-card__content {
        display: contents !important;
    }

    /* 1. h2（タイトル） */
    .tour-card h2 {
        order: 1 !important;
        margin-top: 15px !important; /* 青帯との被り防止 */
        margin-bottom: 0 !important;
        font-size: 20px !important;
    }

    .tour-card h2::after{
        margin-top: 8px !important;
        margin-bottom: 0 !important;
    }

    /* 2. 画像エリア */
    .tour-gallery {
        order: 2 !important;
        display: flex !important;
        flex-direction: column !important;
        margin-top: 0 !important;
        margin-bottom: 6px !important;
    }

    .tour-gallery__main{
        height: auto !important;
        aspect-ratio: 16 / 10 !important;
        margin-bottom: 0 !important;
    }

    .tour-gallery__thumbs{
        gap: 6px !important;
        margin-top: 6px !important;
        margin-bottom: 0 !important;
    }

    /* 3. h3（キャッチコピー） */
    .tour-card h3 {
        order: 3 !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        font-size: 16px !important;
        line-height: 1.4 !important;
    }

    /* 4. 本文 */
    .tour-card p {
        order: 4 !important;
        margin-top: 0 !important;
        margin-bottom: 12px !important;
        font-size: 14px !important;
        line-height: 1.7 !important;
    }

    /* 5. ボタン */
    .tour-btn {
        order: 5 !important;
        width: 100% !important;
        height: 50px !important;
        margin-top: 0 !important;
    }
}