/* -------------------------------------------
    A. リセットと基本設定 (Base Styles)
------------------------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    /* 韓国語フォントを優先し、ヒラギノなどをフォールバック */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Malgun Gothic", "Hiragino Sans", sans-serif; 
    line-height: 1.6;
    color: #333;
    background-color: #ffffff;
}

a {
    text-decoration: none;
    color: inherit;
}

/* サイトコンテンツの最大幅と中央寄せ */
.container {
    width: 95%; /* モバイルで広めに使う */
    max-width: 1000px;
    margin: 0 auto;
    padding: 10px 0 40px;
}

/* -------------------------------------------
    B. ヘッダー (共通 & 背景画像適用)
------------------------------------------- */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2.5%; 
    border-bottom: none; 
    min-height: 120px; 
    color: white; 
    position: relative;
    /* ▼▼ 修正点: z-indexを10に変更し、クリック可能にする ▼▼ */
    z-index: 10; 
}

/* ヘッダー全体に背景画像を設定 */
.header-with-image {
    background-image: url('logo-background.jpg'); 
    background-size: cover; 
    /* 背景位置を半分上へ調整 (center top; または center 0%) */
    background-position: center 40%; 
    background-repeat: no-repeat;
}

/* 画像の上に暗いフィルターをかける（視認性向上） */
.header-with-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3); /* 30%の黒いフィルター */
    z-index: 2; 
}

/* ロゴとボタンの調整 */
.site-logo, .lang-selector {
    position: relative;
    /* .main-headerにz-indexを設定したため、ここは不要だが念のため残す */
    z-index: 3; 
}

.site-logo a {
    color: white !important; 
    font-size: 1.5em;
    font-weight: bold;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

/* 🚀 言語選択ボタンのスタイル (追加/調整) 🚀 */
.lang-selector {
    display: flex; /* 言語コードとボタンを横並びに */
    align-items: center;
    gap: 5px; /* ボタンとコードの間のスペース */
}

.current-lang {
    font-weight: bold;
    color: white; /* 背景画像の上で見えるように白に */
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
    text-transform: uppercase;
    font-size: 1.1em;
}

.lang-button {
    padding: 8px 12px;
    background-color: rgba(255, 255, 255, 0.2); 
    border: 1px solid white;
    color: white;
    border-radius: 5px;
    font-size: 0.8em;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s; /* ホバーアニメーション */
}

.lang-button:hover {
    background-color: rgba(255, 255, 255, 0.8); /* ホバーで明るく */
    color: #333; /* ホバー時に文字色を濃くして視認性確保 */
    border-color: #333;
}
/* ------------------------------------------- */

/* -------------------------------------------
    C. フッター (Footer)
------------------------------------------- */
.footer {
    text-align: center;
    padding: 20px 0;
    font-size: 0.75em;
    color: #999;
    border-top: 1px solid #eee;
}

/* -------------------------------------------
    D. トップページ レイアウト (Top Page Layout)
    - index.html専用のスタイルはここに統合 (クラス名を統一)
------------------------------------------- */

/* === 共通設定 === */
section {
    margin-bottom: 40px;
}
h2 {
    font-size: 1.5em;
    font-weight: bold;
    margin-bottom: 20px;
    padding-left: 5px;
    border-left: 4px solid #ff5a5f; /* ブランドカラー */
}

/* 1. 人気おすすめコース (記事カードリスト) */
.article-list {
    /* index.html の記事一覧に適用（横スクロール） */
    display: flex;
    overflow-x: scroll; /* 横スクロールを可能にする */
    -webkit-overflow-scrolling: touch; 
    gap: 15px;
    padding-bottom: 10px; 
}

/* リストページ (list-kanto.html など) の記事一覧に適用 */
/* 記事一覧ページでは、横スクロールを解除し、グリッド表示にするためのスタイル */
.page-list-title + p {
    margin-bottom: 25px;
    color: #555;
}
.page-list-title + p + .article-list {
    display: grid;
    /* 250pxを最低幅として、利用可能なスペースで自動的に列を埋める */
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); 
    overflow-x: unset;
    padding: 0;
}

.article-card {
    flex-shrink: 0; 
    width: 65%; /* index.html の横スクロール用 (モバイル幅設定) */
    max-width: 250px;
    
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
    background-color: #fff;
}
.article-card:hover {
    transform: translateY(-3px);
}

.article-image {
    width: 100%;
    height: 160px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.popular-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background-color: #ff5a5f;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.7em;
    font-weight: bold;
}

.article-info {
    padding: 10px 12px;
}
.article-info h2 {
    font-size: 1em;
    font-weight: bold;
    margin: 0 0 8px;
    border-left: none; 
    padding-left: 0;
    line-height: 1.4;
}
.article-meta {
    font-size: 0.8em;
    color: #999;
    margin-bottom: 8px;
}
.article-meta span {
    margin-right: 10px;
}
.article-themes {
    margin-top: 5px;
}
.theme-tag {
    display: inline-block;
    background-color: #f0f0f0;
    color: #666;
    padding: 3px 6px;
    border-radius: 3px;
    font-size: 0.7em;
    margin-right: 5px;
    margin-bottom: 5px;
}


/* 2. 地域別ガイド (エリア別カード) */
.area-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* モバイルは2列 */
    gap: 15px;
}

.area-card {
    display: block;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: background-color 0.3s;
}

.area-card h3 {
    font-size: 1.1em;
    margin-bottom: 5px;
}
.area-card p {
    font-size: 0.8em;
    color: #777;
}

/* エリア別テーマカラー */
.area-card.kanto { background-color: #e6f7ff; }
.area-card.kansai { background-color: #fff4e6; }
.area-card.kyushu { background-color: #e6ffe6; }
.area-card.hokkaido { background-color: #f0f0f8; }


/* 3. テーマ別コース (テーマ別カード) */
.theme-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* モバイルは3列 */
    gap: 10px;
}

.theme-card {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 60px;
    border-radius: 5px;
    background-color: #f7f7f7;
    transition: background-color 0.2s;
}
.theme-card h3 {
    font-size: 0.9em;
    font-weight: normal;
    color: #444;
}
.theme-card:hover {
    background-color: #eee;
}

/* -------------------------------------------
    E. PC/タブレット対応 (メディアクエリ)
------------------------------------------- */
@media (min-width: 768px) {
    .main-header {
        min-height: 150px; 
    }
    
    /* 横スクロールの記事カードの幅を固定 */
    .article-card {
        width: 280px; 
        max-width: 280px;
    }

    /* エリア別カードをPCでは4列表示に */
    .area-links {
        grid-template-columns: repeat(4, 1fr); 
    }
    
    /* テーマ別カードをPCでは6列表示に */
    .theme-links {
        grid-template-columns: repeat(6, 1fr); 
    }
}