/*
 * 全てをbox-sizing: border-box;に設定することで、paddingやborderが原因の横幅はみ出しを完全に解消します。
 */
*, *::before, *::after {
    box-sizing: border-box;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f9f9f9;
    color: #333;
    line-height: 1.7;
    text-rendering: optimizeSpeed;
    overflow-x: hidden; 
}
/* モバイルメニュー展開時、背景のスクロールを止めるためのクラス */
.no-scroll {
    overflow: hidden;
}

a {
    color: #1A0DAB;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}
img {
    max-width: 100%; 
    height: auto;
    display: block;
}

/* --- ヘッダー --- */
.header {
    background-color: #fff;
    /* 修正1: ヘッダー全体の上下パディングを0にする (縦幅スリム化) */
    padding: 0 5%;
    border-bottom: 1px solid #eee;
    /* ★修正点１：モバイルで固定するために sticky/top:0 を適用します */
    position: sticky; 
    top: 0;
    z-index: 100;
}


/* ----------------------------------- */
/* --- PC表示用のスタイル (769px以上) の位置はここに移動しました --- */
/* ----------------------------------- */
/*
    注：このメディアクエリの位置は、既存のスタイルを上書きするためにファイルの最後の方にあることが推奨されます。
    今回は、ご提示いただいた構造に従い、この位置に残します。
*/


.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    /* モバイル時の中央配置のための設定 */
    display: flex;
    justify-content: space-between; 
    /* 修正2: 中央寄せを強制し、縦幅を固定 */
    align-items: center !important; 
    min-height: 65px; /* ロゴ(60px)に合わせて65pxに設定 */
}

/* ロゴ画像表示のためのスタイル */
.site-title {
    /* モバイル時の中央寄せ設定 */
    text-align: center;
    flex-grow: 1; 
}
.site-title a {
    text-decoration: none;
    line-height: 1; 
    display: inline-block; 
}
.logo-img {
    /* ロゴ画像のサイズ調整と中央寄せ */
    height: 60px !important; 
    width: auto !important;
    display: block;
    margin: 0 auto; 
    
    /* 修正3: position/topでロゴを下にずらす */
    position: relative; 
    top: 8px; 
}

/* PC用ナビゲーション (モバイルでは非表示) */
.header-nav {
    display: none; 
}
/* PCナビゲーションの配置とスタイルの調整 */
.header-nav ul {
    list-style: none;
    padding: 0;
    margin: 0; 
    display: flex; 
    gap: 20px; 
}
.header-nav li {
    margin: 0;
    padding: 0;
    /* 修正4: ナビの余分な行の高さをリセットし、縦幅を縮める */
    line-height: 0;
}
.header-nav li a {
    display: block;
    /* 修正5: 上下のパディングを0pxにする (縦幅スリム化) */
    padding: 0 5px; 
    color: #333;
    font-weight: bold; /* トップナビの太字設定 */
    white-space: nowrap; 
    /* 修正6: テキストの行高さを制御 */
    line-height: 1.2;
}


/* ハンバーガーメニューアイコン (PCでは非表示) */
.hamburger-menu {
    display: block; 
    cursor: pointer;
    width: 30px;
    height: 21px;
    position: relative;
    transition: all 0.4s;
}
.hamburger-menu span {
    display: block;
    position: absolute;
    width: 100%;
    height: 3px;
    background-color: #333;
    border-radius: 4px;
    transition: all 0.4s;
}
.hamburger-menu span:nth-child(1) { top: 0; }
.hamburger-menu span:nth-child(2) { top: 9px; }
.hamburger-menu span:nth-child(3) { bottom: 0; }
.hamburger-menu.active span:nth-child(1) { transform: translateY(9px) rotate(-45deg); }
.hamburger-menu.active span:nth-child(2) { opacity: 0; }
.hamburger-menu.active span:nth-child(3) { transform: translateY(-9px) rotate(45deg); }

/* --- モバイル用全画面ナビゲーション --- */
.mobile-nav {
    display: none; 
    position: fixed;
    /* 修正7: ロゴの高さ(60px)に合わせてナビゲーションの開始位置を調整 */
    top: 70px; 
    left: 0;
    width: 100%;
    height: calc(100% - 70px); 
    background-color: rgba(255, 255, 255, 0.98);
    z-index: 99;
    overflow-y: auto;
}
.mobile-nav.open {
    display: block; 
}
.mobile-nav ul {
    list-style: none;
    padding: 20px 0;
    margin: 0;
}

/* 修正8: HOMEの上部の余白調整 */
.mobile-nav ul li:first-child {
    padding-top: 60px !important; /* HOMEの上部のみパディングを増やす */
}

.mobile-nav li {
    text-align: center;
    padding: 15px 0; /* 元の上下15pxのパディング */
    border-bottom: 1px solid #eee;
}


.mobile-nav li:last-child {
    border-bottom: none;
}
.mobile-nav a {
    font-size: 18px;
    color: #333;
    font-weight: bold;
    display: block;
    padding: 10px 0;
}

/* --- メインビジュアル --- */
.main-visual {
    width: 100%;
    /* 旧サイトの高さに合わせて最大高さを600pxに設定してもOK */
    max-height: 500px; 
    overflow: hidden;
}

/* --- メインコンテナ (モバイルファースト) --- */
.container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 5%;
    display: flex;
    flex-direction: column; 
    gap: 30px;
}


/* --- パンくずリスト (追加) --- */
.breadcrumb-area {
    background-color: #f0f0f0; /* 背景色で領域を明確に */
    padding: 10px 5%;
    border-bottom: 1px solid #ddd;
}
.container-small {
    /* メインコンテナと幅を合わせるための最大幅設定 */
    max-width: 1200px; 
    margin: 0 auto;
}
.breadcrumb-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap; /* 長いタイトルで折り返しを許可 */
    font-size: 0.9em;
}
.breadcrumb-list li {
    margin-right: 5px;
    color: #666;
    white-space: nowrap;
}
.breadcrumb-list li:not(:last-child)::after {
    content: ">";
    margin-left: 5px;
}
.breadcrumb-list li a {
    color: #1A0DAB;
}
.breadcrumb-list li strong {
    font-weight: normal; /* 現在地は太字にしない */
    color: #333;
}

/* --- タイトル調整 (下層ページ用) --- */
/* メインコンテンツ内のページタイトル */
.page-title {
    font-size: 2em;
    margin-top: 0;
    margin-bottom: 40px;
    padding-bottom: 15px;
    border-bottom: 3px solid #800020; /* ページタイトルを目立たせる */
    color: #1a1a1a;
}

/* モバイル表示でのページタイトル調整 (768px以下) */
.page-title {
    /* PCの 2em を上書きし、モバイルでは 1.7em に縮小 */
    font-size: 1.7em; 
}

/* PC表示になったら元の 2em に戻すための記述 */
@media (min-width: 769px) {
    /* ... 既存のPC用のスタイル ... */
    
    /* ページのタイトルをPCで大きく表示し直す */
    .page-title {
        font-size: 2em; /* PC表示では元のサイズに戻す */
    }
}


/* トップページにあったH2タグは、メインコンテンツH2タグが各sectionのタイトルとして使われるよう、元のclassを削除 */
/* .main-content h2 は content-section のH2を引き継ぐため、この設定でOK */


/* --- メインコンテンツ & サイドバー (モバイル共通) --- */
.main-content, .sidebar {
    width: 100%; 
    background-color: #fff;
    padding: 30px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* サイドバーのウィジェット間隔調整 */
.widget {
    margin-bottom: 30px; 
}
.widget:last-child {
    margin-bottom: 0; 
}

.content-section { margin-bottom: 40px; }
.blog-post { margin-bottom: 20px; }

/* サイドバーのウィジェットスタイル */
.widget h3 {
    margin-top: 0;
    border-bottom: 2px solid #800020;
    padding-bottom: 10px;
    font-size: 18px;
}
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget ul li { padding: 5px 0; border-bottom: 1px dotted #ccc; }
.widget ul li:last-child { border-bottom: none; }
.profile-img { max-width: 100px; border-radius: 50%; display: block; margin: 10px auto; }
.profile-name { text-align: center; font-weight: bold; font-size: 1.1em; }
.profile-link { display: block; text-align: center; margin-top: 15px; font-weight: bold; }

/* --- フッター --- */
.footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 20px 5%;
    margin-top: 40px;
}

/* --- LP用 フル幅レイアウト (追加) --- */
.container-full {
    display: block; 
}
.main-content-full {
    width: 100%; 
    flex: 1 1 100%; 
}

/* ----------------------------------- */
/* --- PC表示用のスタイル (769px以上) --- */
/* ----------------------------------- */
@media (min-width: 769px) {
    /* ヘッダー: PCナビを表示、ハンバーガーを非表示 */
    .header-nav {
        display: block; 
    }
    .hamburger-menu {
        display: none; 
    }
    .mobile-nav {
        display: none !important; 
    }
    
    /* ★修正点２：PC表示になったらヘッダー固定を解除する（グローバルを上書き） */
    .header {
        position: static !important; /* !important で強制的に非固定に */
        top: auto !important;
    }
    
    /* PCナビを横並びにし、間隔を調整 */
    .header-nav ul {
        display: flex; 
        gap: 20px; 
    }

    /* PC表示時にロゴを左寄せに戻す */
    .site-title {
        text-align: left; /* PCでは左端に戻す */
        flex-grow: 0; 
    }
    .logo-img {
        margin: 0; /* PCでは中央揃えを解除 */
    }

    /* メインコンテナ: メインコンテンツとサイドバーを横並びにする */
    .container {
        flex-direction: row; 
    }
    
    /* メインコンテンツとサイドバーの幅調整 */
    .main-content {
        flex: 2.5; 
    }
    .sidebar {
        flex: 1; 
    }
    
    /* LP用コンテナのPCレイアウト調整 */
    .container-full {
        flex-direction: column; 
    }
    .main-content-full {
        width: 100%; /* PCで強制的に100%幅に */
        flex: none; /* flex設定を無効化 */
        max-width: 900px; /* センター寄せを考慮 */
        margin: 40px auto; 
    }
}



/* --- Flexboxによる 1:2 カラムレイアウトの再現 --- */

/* 行 (row) の役割。アイテムを横並びにする */
.flex-row {
    display: flex;
    flex-wrap: wrap; /* 画面が狭くなったら折り返す */
    gap: 30px; /* カラム間のスペース */
    margin-bottom: 40px; /* 下の要素との余白 */
}

/* 2/3 幅のテキストエリア側 */
.flex-col-2-3 {
    flex: 2; /* 2の比率 */
    min-width: 300px; /* モバイルで折り返さない最低幅 */
}

/* 1/3 幅の画像側 */
.flex-col-1-3 {
    flex: 1; /* 1の比率 */
    min-width: 200px; /* モバイルで折り返さない最低幅 */
}

/* モバイル表示では縦並びに戻す */
@media (max-width: 768px) {
    .flex-row {
        flex-direction: column; /* 縦並び */
        gap: 20px;
    }
    .flex-col-1-3, .flex-col-2-3 {
        flex: none; /* Flexの比率を解除 */
        width: 100%;
        min-width: auto;
    }
}

/* カスタムボタンのデザイン (元のBootstrap風を再現) */
.custom-button {
    display: block;
    width: 100%;
    text-align: center;
    padding: 15px;
    margin-top: 20px;
    background-color: #007bff; /* 青系（既存のブランドカラー） */
    color: white;
    font-weight: bold;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.3s;
}

.custom-button:hover {
    background-color: #0056b3;
    text-decoration: none;
}

