/* 基本設定とリセット (変更なし) */
body {
    font-family: sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    color: #333;
    background-color: #fff;
}

/* 青の定義（変更なし） */
:root {
    --main-blue: #0056b3;
    --light-blue: #f0f8ff;
    --text-white: #fff;
}

/* 全体の幅を制限し、中央寄せにするコンテナ (変更なし) */
.container {
    width: 90%;
    max-width: 1000px;
    margin: 0 auto;
}

/* セクションの共通パディング (変更なし) */
.section-padding {
    padding: 30px 0;
}

/* --- ヘッダー（固定ナビゲーション） --- */
header {
    background-color: var(--main-blue);
    color: var(--text-white);
    padding: 15px 0;
    position: sticky; /* スクロールしても固定 */
    top: 0;
    z-index: 100;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-size: 1.5em;
    margin: 0;
}

nav a {
    color: var(--text-white);
    text-decoration: none;
    margin-left: 20px;
    padding: 5px 10px;
    transition: background-color 0.3s;
}

nav a:hover {
    background-color: rgba(255, 255, 255, 0.2); /* ホバーで薄く白く */
    border-radius: 4px;
}

/* --- メインビジュアル (Hero Section) --- */
#hero {
    /* PC・タブレット向けの基本設定（600px） */
    height: 500px; /* ここがPCの高さになります */
    
    background-image: url('main-visual.jpg'); 
    background-size: cover; 
    background-position: center; 
    background-repeat: no-repeat;
    
    /* その他の設定は省略... */
    display: flex; 
    justify-content: center;
    align-items: center;
    color: var(--text-white);
    text-align: center;
}

/* --- レスポンシブ対応 (スマートフォン向け調整) --- */
@media (max-width: 768px) {
    /* 画面幅が768px以下の場合に適用されるスタイル */
    
    /* スマートフォン向けのメインビジュアルの高さ（400px） */
    #hero {
        height: 300px;
    }

    /* その他、前回のレスポンシブ対応CSS（ヘッダーなど）もここに含めます */
    header .container {
        flex-direction: column; 
        text-align: center;
    }

    nav {
        margin-top: 10px;
    }

    nav a {
        display: block; 
        margin: 5px 0;
    }
}
/* --- メインコンテンツのセクション --- */
h2 {
    font-size: 2em;
    text-align: center;
    margin-bottom: 40px;
    color: var(--main-blue);
}

/* 青背景のセクション（事業内容） */
.background-blue {
    background-color: var(--light-blue); /* 薄い青の背景 */
}

/* 事業内容のレイアウト */
.business-item {
    margin-bottom: 30px;
    padding: 20px;
    border-left: 5px solid var(--main-blue); /* 青の強調線 */
    background-color: #fff; /* アイテムの背景は白に戻す */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.business-item h3 {
    color: var(--main-blue);
    margin-top: 0;
}

/* 社長あいさつの署名 */
.signature {
    text-align: right;
    font-style: italic;
    margin-top: 30px;
}

/* お問合せのリンクの色 */
#contact a {
    color: var(--main-blue);
    text-decoration: none;
    font-weight: bold;
}

/* --- フッター --- */
footer {
    background-color: #333;
    color: var(--text-white);
    text-align: center;
    padding: 20px 0;
    font-size: 0.9em;
}

/* --- ハンバーガーメニュー関連 --- */

/* 1. ハンバーガーアイコンの初期設定（PCでは非表示） */
.menu-toggle {
    display: none; /* 初期状態では非表示 */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 10; /* ナビゲーションの上に表示されるように */
}

/* 2. ハンバーガーの3本線のデザイン */
.menu-toggle .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px 0;
    background-color: var(--text-white); /* 青背景なので白線に */
    transition: all 0.3s ease;
}


/* --- レスポンシブ対応 (スマートフォン向け調整) --- */
@media (max-width: 768px) {
header .container {
        /* スマホ時もロゴとアイコンを左右に配置するためにFlexboxを維持 */
        flex-direction: row; 
        justify-content: space-between; /* 左右に離す */
        align-items: center;
    }

    /* 1. ハンバーガーアイコンを表示 */
    .menu-toggle {
        display: block; 
    }

    /* 2. ナビゲーションを非表示にし、画面全体に広がるように設定 */
    #main-nav {
        /* display: none; は削除します。 */
        
        position: absolute;
        top: 65px; /* ヘッダーの高さに合わせて調整 */
        left: 0;
        width: 100%;
        background-color: var(--main-blue);
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        z-index: 5;
        
        /* 💡 ぬるっとアニメーションのための追加/変更 */
        max-height: 0; /* 初期状態では高さをゼロにして隠す */
        overflow: hidden; /* 高さがゼロの時に中身を非表示にする */
        transition: max-height 0.4s ease-in-out; /* 0.4秒かけて滑らかに変化させる */
    }

    /* 3. ナビゲーションのリンクを縦並びにする */
    #main-nav a {
        display: block; 
        text-align: center;
        padding: 15px 0;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
        margin: 0; 
    }

    /* 4. JavaScriptで付与されるクラスでメニューを表示 */
    #main-nav.is-open {
        /* 💡 is-openが付いたときに、メニューの高さを十分に確保して表示 */
        /* heightではなく max-height を使うことで、中身の量に関わらずスムーズに開く */
        max-height: 300px; /* メニュー全体が入る十分な高さを設定 (例として300px) */
    }
}

/* --- ロゴ画像のスタイル --- */
.company-logo {
    /* 画像の高さ（ナビゲーションバーの高さに合わせて調整） */
    height: 60px; 
    /* 幅は高さに合わせて自動調整されます */
    width: auto; 
    /* ナビゲーションと画像の間に少し余白を作る */
    vertical-align: middle; 
}

/* ヘッダー内のh1をimgに置き換えたため、h1へのスタイルは不要になる可能性があります */
/* ただし、ここでは<img>を<a>で囲んでいるので、<a>タグに余計なスタイルがかからないか確認します。 */

header .container a {
    /* もし<a>タグに余計な青い下線などがついたら、ここでリセットします */
    text-decoration: none;
    color: inherit; 
}

