/* 旅程用Heroの高さ調整 */
.small-hero {
    height: 50vh !important;
}

.timeline-item {
    position: relative;
    margin-bottom: 50px;
}

/* タイムラインの点 */
.timeline-item::before {
    content: "";
    position: absolute;
    left: -51px;
    top: 5px;
    width: 16px;
    height: 16px;
    background: white;
    border: 2px solid var(--accent-gold);
    border-radius: 50%;
}

.timeline-item .time {
    font-family: 'Playfair Display', serif;
    color: var(--accent-gold);
    font-size: 1.2rem;
    font-weight: bold;
}

.timeline-item h3 {
    margin: 5px 0;
    color: var(--deep-navy);
    font-size: 1.1rem;
}

.timeline-item p {
    font-size: 0.9rem;
    color: var(--text-main);
    margin: 0;
}

/* ハイライト（アンカリングなど） */
.timeline-item.highlight::before {
    background: var(--accent-gold);
}

/* 戻るボタン */
.back-button {
    display: inline-block;
    padding: 15px 40px;
    border: 1px solid var(--deep-navy);
    color: var(--deep-navy);
    text-decoration: none;
    letter-spacing: 0.2em;
    transition: 0.3s;
}

.back-button:hover {
    background: var(--deep-navy);
    color: white;
}

/* スマホ調整 */
@media (max-width: 768px) {
    .itinerary-timeline {
        margin-left: 20px;
    }
}

/* 1. ヘッダー画像のタイル化防止と全幅表示 */
.page-header.small-hero {
    height: 60vh;
    background-size: cover;      /* 隙間なく広げる */
    background-position: center; /* 中央合わせ */
    background-repeat: no-repeat;/* タイル化防止 */
    position: relative;
    width: 100%;
}

/* 2. 背景グレー(navy-block)の干渉をリセット */
/* 共通CSSのnavy-blockが100vwで広がっている場合、本ページでは背景を白に戻す */
.content-wrapper {
    background-color: #fff;
    position: relative;
    z-index: 1;
}

/* 5. スマホでの表示調整 */
@media (max-width: 768px) {
    .page-header.small-hero {
        height: 40vh; /* スマホでは高さを抑える */
    }
    
    .itinerary-timeline {
        padding-left: 30px;
    }

    /* スマホで文字が欠けないよう、左右の余白を再定義 */
    .hero-text-container {
        padding: 100px 20px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .title-top {
        font-size: 1.8rem;
    }
}

/* --- タイムライン全体のベース調整 --- */
.itinerary-timeline {
    position: relative; /* 線を配置するための基準 */
    max-width: 800px;
    margin: 40px auto;
    padding: 20px 20px 20px 50px; /* 左側に50pxの絶対的なスペースを確保 */
    background: #fff;
    list-style: none;
}

/* 縦線：itemのbeforeではなく、親要素に1本引くほうがスマホでは安定します */
.itinerary-timeline::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 25px; /* 丸印の中心に合わせる */
    width: 2px;
    background: var(--border, #e0e0e0); /* style.cssの変数か色コード */
    z-index: 1;
}

/* 各アイテムの設定 */
.timeline-item {
    position: relative;
    margin-bottom: 60px;
    z-index: 2; /* 線より上に出す */
}

/* 丸印：絶対座標で固定 */
.timeline-item::before {
    content: "";
    position: absolute;
    left: -33px; /* 線の位置(25px)に合わせる計算: 25px - (丸の半径8px) = 17px... 
                   ただしpadding 50pxがあるので、要素の左端からマイナス方向に調整 */
    top: 8px;
    width: 16px;
    height: 16px;
    background: #fff;
    border: 2px solid var(--accent-gold, #b39359);
    border-radius: 50%;
    z-index: 3;
}

/* ハイライト時の丸印 */
.timeline-item.highlight::before {
    background: var(--accent-gold, #b39359);
}

/* --- スマホ専用のレスポンシブ修正 --- */
@media (max-width: 768px) {
    .itinerary-timeline {
        padding-left: 45px; /* スマホでも左側のスペースを死守 */
        margin-left: 10px;  /* 画面端に密着しすぎないように */
        margin-right: 10px;
    }

    .itinerary-timeline::after {
        left: 20px; /* スマホ用に線の位置を少し左へ */
    }

    .timeline-item::before {
        left: -33px; /* 線の位置に合わせて微調整（ブラウザで見てズレていたらここを弄る） */
        width: 14px;
        height: 14px;
    }
    
    /* 経過時間のテキストがはみ出さないように */
    .timeline-item .time {
        font-size: 1.4rem;
        display: block;
        margin-bottom: 5px;
    }
}

/* --- 3. タイムライン内の画像スタイリング --- */
.timeline-img {
    margin-top: 20px;
    max-width: 360px; /* PCでは幅を抑える（お好みに合わせて400px?500px程度が上品です） */
    overflow: hidden;
    border-radius: 2px; /* Grand Banksの直線的な美しさに合わせ、角丸を最小限に */
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 1px solid var(--border); /* 額縁のような効果 */
    transition: transform 0.4s ease;
}

/* ホバー時に少しだけ浮き上がる演出（洗練されたWebのギミック） */
.timeline-img:hover {
    transform: translateY(-5px);
}

.timeline-img img {
    width: 100%;
    height: auto;
    display: block;
    filter: brightness(0.95); /* 少し落ち着いたトーンに */
}

/* --- 5. スマホでの表示調整 --- */
@media (max-width: 768px) {
    /* ...中略... */
    
    .timeline-img {
        max-width: 100%; /* スマホでは画面幅に合わせて100%表示 */
        margin-top: 15px;
    }
    
    .timeline-img:hover {
        transform: none; /* スマホではホバー演出をオフに */
    }
}

/* 写真グループの基本設定（PC版：横並び） */
.timeline-img-group {
    display: flex;
    gap: 15px;      /* 写真同士の間隔 */
    margin-top: 20px;
    max-width: 100%; /* 親要素の幅に合わせる */
}

/* 2枚並びの時の1枚あたりのサイズ調整 */
.timeline-img-group .timeline-img {
    flex: 1;        /* 均等な幅で並べる */
    max-width: calc(50% - 8px); /* PCでも大きすぎないよう制限 */
    margin-top: 0;  /* グループ内では上マージンをリセット */
}

/* 通常の1枚写真のスタイル（以前の定義を維持） */
.timeline-img {
    overflow: hidden;
    border-radius: 2px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 1px solid var(--border);
}

.timeline-img img {
    width: 100%;
    height: 250px;   /* PC版で高さを揃えると綺麗に見えます */
    object-fit: cover; /* 比率の違う写真でも枠内に収める */
    display: block;
}

/* --- スマホ表示調整 --- */
@media (max-width: 768px) {
    .timeline-img-group {
        flex-direction: column; /* スマホでは縦に並べる */
        gap: 10px;
    }

    .timeline-img-group .timeline-img {
        max-width: 100%; /* スマホでは全幅 */
    }

    .timeline-img img {
        height: auto;   /* スマホでは写真本来の比率で見せる */
    }
}
