@charset "Shift_JIS";

/* ==================================================
   1. 基本設定 (PC/共通)
   ================================================== */

BODY {
    margin: 0px;
    padding: 0px;
    background-color: white;
    text-align: center;
    font-family: "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: bottom;
}

/* キャッチコピー */
H1 {
    font-size: 12px;
    font-weight: normal;
    padding: 4px 10px;
    margin: 0px;
    text-align: left;
    background-color: #f4f4f4;
    border-bottom: 1px solid #ddd;
}

/* 全体を囲う箱 */
DIV#wrapper {
    margin: 0 auto;
    width: 900px; /* PC幅 */
    border: solid 1px #aac;
    text-align: center;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

/* ---- ヘッダー（ロゴエリア） ---- */
DIV#header {
    margin: 0px;
    padding: 0px;
    border: none;
    height: 420px; /* PCでの高さ */
    color: black;
    background-image: url(../logo.png);
    background-repeat: no-repeat;
    background-position: center top;
    background-color: white;
    position: relative;
}

/* ヘッダー内のリンク（文字を透明にする） */
DIV#header a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: transparent; 
}

/* ---- コンテンツ配置（PC） ---- */
/* メイン記事（左側） */
DIV#contents {
    float: left;
    width: 76%;
    text-align: left;
    font-size: 14px;
    line-height: 1.6;
    padding: 20px;
    box-sizing: border-box;
}

/* メニュー（右側） */
DIV#menu {
    float: right;
    width: 24%;
    text-align: left;
    padding: 10px;
    box-sizing: border-box;
    background-color: #f9f9f9;
}

/* フッター */
div#footer {
    clear: both;
    margin-top: 0;
    padding: 20px;
    background-color: #383A75; /* 紺色 */
    color: #fff;
    font-size: small;
}
div#footer a { color: #fff; text-decoration: none; }


/* ==================================================
   2. デザイン詳細
   ================================================== */

A:link { color: blue; }
a:visited { color: #000099; }
a:hover { color: #f00; opacity: 0.8; }

/* 見出し H2（紺色バー） */
DIV#contents H2 {
    margin: 0 0 20px 0;
    padding: 15px;
    background-color: navy;
    font-size: 18px;
    color: #ffffff;
    line-height: 1.4;
    font-weight: bold;
    border-radius: 4px;
    border-bottom: 2px solid #000050;
}

/* 見出し H3 */
DIV#contents H3 {
    margin: 30px 0 15px 0;
    padding: 8px 10px;
    background: none;
    border-bottom: 2px solid navy;
    font-size: 16px;
    font-weight: bold;
    color: #333;
    border-left: 8px solid navy;
}

DIV#contents UL { margin-top: 1em; }
div#contents li { margin-bottom: 0.5em; list-style: url(../images/ul.gif); }
div#contents p { margin: 0.8em 1em 0; line-height: 1.5; }

/* ---- サイドメニューを「ボタン化」 ---- */

DIV#menu H2 {
    font-size: 14px;
    color: white;
    padding: 8px;
    margin: 15px 0 8px 0;
    background-color: navy;
    text-align: center;
    border-radius: 4px;
    border: none;
}
DIV#menu H2:first-child { margin-top: 0; }

DIV#menu H3 {
    font-size: 13px;
    border: none;
    padding: 0; 
    margin: 0 0 5px 0;
    text-align: left;
    background: none;
}

/* メニューのリンクを「ボタン」にする */
DIV#menu H3 A {
    display: block;
    padding: 12px 15px;
    font-size: 13px;
    font-weight: bold;
    color: #333;
    text-decoration: none;
    background-color: #fff;
    border: 1px solid #dcdcdc;
    border-left: 6px solid navy; /* 紺色のライン */
    border-radius: 3px;
    position: relative;
    box-shadow: 0 2px 3px rgba(0,0,0,0.05);
    transition: 0.2s;
}

/* 右側の「＞」矢印 */
DIV#menu H3 A::after {
    content: "";
    display: block;
    width: 5px;
    height: 5px;
    border-top: 2px solid #aaa;
    border-right: 2px solid #aaa;
    transform: rotate(45deg);
    position: absolute;
    right: 15px;
    top: 50%;
    margin-top: -4px;
}

/* マウスを乗せた時 */
div#menu h3 a:hover {
    color: navy;
    background-color: #f0f0ff;
    transform: translateX(3px);
    text-decoration: none;
}


/* ==================================================
   3. スマホ対応 (レスポンシブ)
   ================================================== */

@media screen and (max-width: 768px) {

    /* --- レイアウト順序 --- */
    DIV#wrapper {
        display: flex;
        flex-direction: column;
        width: 100%;
        border: none;
        box-shadow: none;
    }

    H1 { order: 1; }
    DIV#header { order: 2; }
    DIV#contents { order: 3; }
    DIV#menu { order: 4; }
    DIV#footer { order: 5; }

    /* --- ヘッダー画像（ロゴ）調整 --- */
    /* 900px : 420px の比率を守る設定 */
    DIV#header {
        height: auto;
        padding-top: 46%; /* 420/900 = 約46% */
        background-size: contain;
        background-position: center top;
        text-indent: -9999px; 
    }
    DIV#header a { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

    /* --- コンテンツ幅 --- */
    DIV#contents, DIV#menu {
        width: 100%;
        float: none;
        padding: 15px;
    }

    /* 画像のサイズ調整 */
    DIV#contents img {
        width: 100%;
        height: auto;
        float: none !important; /* スマホでは画像の回り込みを解除 */
        margin: 10px 0;
    }

    /* スマホ用にメニューボタンをさらに押しやすく */
    DIV#menu H3 {
        margin-bottom: 10px;
    }
    DIV#menu H3 A {
        padding: 15px;
        font-size: 14px;
    }
}