/*
Theme Name: Yajima-Theme
Description: 矢島製作所用 オリジナルテーマ (TCD104風・レスポンシブメニュー搭載)
Version: 1.2
*/

/* --- 全体の基本設定 --- */
body {
    margin: 0;
    padding: 0;
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    color: #333;
    background-color: #fff;
    line-height: 2;
}

/* --- ヘッダー共通レイアウト --- */
.site-header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: relative;
    z-index: 1000;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.site-logo a {
    font-size: 24px;
    font-weight: bold;
    color: #111;
    text-decoration: none;
    letter-spacing: 0.05em;
}

/* --- モバイル用ハンバーガーボタン（デフォルトは非表示） --- */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 30px;
    height: 2px;
    background: #111;
    margin: 6px 0;
    transition: 0.3s;
}

/* --- PC用ナビゲーション & メガメニュー構造 --- */
.site-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-nav ul li {
    position: relative; /* 子メニューの基準点 */
    margin-left: 30px;
}

.site-nav a {
    text-decoration: none;
    color: #111;
    font-size: 14px;
    font-weight: 500;
    display: block;
    padding: 10px 0;
}

/* メガメニュー（ドロップダウン）の初期状態：隠す */
.site-nav ul li ul {
    display: block;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px; /* メガメニューの横幅 */
    background: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    padding: 30px;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s ease;
    border-top: 2px solid #111;
    display: flex; /* 横並びにする */
    flex-wrap: wrap;
}

/* 親メニューにマウスを乗せたらメガメニューを表示 */
.site-nav ul li:hover > ul {
    opacity: 1;
    visibility: visible;
}

/* メガメニュー内の各項目 */
.site-nav ul li ul li {
    width: 50%; /* 2列で並べる */
    margin: 0;
    padding: 10px;
    box-sizing: border-box;
}

/* --- メインビジュアル --- */
.hero-section {
    width: 100%;
    height: 70vh;
    background-color: #f4f4f4;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-text h2 {
    font-size: 42px;
    letter-spacing: 0.1em;
}

/* --- モバイル対応（画面幅が768px以下の場合） --- */
@media (max-width: 768px) {
    .header-inner {
        padding: 15px 20px;
    }

    .menu-toggle {
        display: block; /* ハンバーガーボタンを表示 */
    }

    /* ハンバーガーがアクティブになった時のバツ印アニメーション */
    .menu-toggle.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .menu-toggle.active span:nth-child(2) { opacity: 0; }
    .menu-toggle.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    /* スマホ時はメニューを上から引き下ろす形式に */
    .site-nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #fff;
        border-top: 1px solid #eee;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-in-out;
    }

    /* ボタンが押されたらメニューを開く */
    .site-nav.active {
        max-height: 500px;
        overflow-y: auto;
    }

    .site-nav ul {
        flex-direction: column;
        padding: 20px;
    }

    .site-nav ul li {
        margin: 0;
        border-bottom: 1px solid #eee;
    }

    /* スマホ時はメガメニューを縦並びのシンプルなリストに */
    .site-nav ul li ul {
        position: static;
        transform: none;
        width: 100%;
        box-shadow: none;
        padding: 10px 0 0 20px;
        opacity: 1;
        visibility: visible;
        display: block;
        border: none;
    }

    .site-nav ul li ul li {
        width: 100%;
        border: none;
        padding: 5px 0;
    }
}