* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


/* 共通ヘッダー */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;

    height: 140px;
    width: 100%;

    background-color: rgb(11, 40, 74);
    box-shadow: 0 2px 5px rgba(255, 255, 255, 0.2);
    z-index: 10000;

    background-image:
        repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.1) 0, rgba(255, 255, 255, 0.1) 1px, transparent 1px, transparent 30px),
        repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.1) 0, rgba(255, 255, 255, 0.1) 1px, transparent 1px, transparent 30px);
}

/* ★ 追加：ロゴ・ナビをheader内で自動配置するコンテナ */
.header-container {
    position: relative;
    /* ★ 追加：スマホ用ドロップダウンメニューの位置基準にするため */
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 100%;
    max-width: none;
    margin: 0;
    padding: 0 40px;
    box-sizing: border-box;
}


body {
    margin: 0;
    width: 100%;
    min-height: 100vh;
    background-color: #ffffff;
    background-image:
        linear-gradient(45deg, rgba(11, 40, 74, 0.035) 25%, transparent 25%, transparent 75%, rgba(11, 40, 74, 0.035) 75%),
        linear-gradient(45deg, rgba(11, 40, 74, 0.035) 25%, transparent 25%, transparent 75%, rgba(11, 40, 74, 0.035) 75%);
    background-size: 30px 30px;
    background-position: 0 0, 15px 15px;
    overflow-x: hidden;
    /* ★ 追加：横スクロール事故の防止 */
}


/* ヘッダー会社ロゴ */
.logo {
    margin: 0;
    flex-shrink: 0;
    /* ★ 追加：ナビと詰まっても縮まないように */
}

.logo a {
    display: block;
}

.logo img {
    /* position: fixed; ← ★ 削除：flexで配置されるので不要かつ危険 */
    display: block;
    width: clamp(140px, 14vw, 230px);
    /* ★ 固定230px → 可変に */
    height: auto;
    /* ★ 固定130pxを廃止、縦横比を保持 */
    max-height: 110px;
}


/* ヘッダーメニュー */
.navi-list {
    display: inline-flex;
    align-items: center;
    font-size: clamp(15px, 1.6vw, 22px);
    /* ★ clamp(13px, 1.4vw, 20px) → 少し大きく調整 */
    letter-spacing: clamp(1px, 0.2vw, 3px);
    font-weight: 700;
    /* ★ font-weight:10pxは無効値だったため修正 */
    list-style: none;
    z-index: 1;
    color: aliceblue;

    margin: 0;
    /* ★ margin-left:1080px を削除。これが最大の崩れ原因でした */
    padding: 0;
    gap: clamp(8px, 1.6vw, 20px);
    /* ★ clamp(14px, 2.5vw, 30px) → 縮小。各項目の間隔を詰めて
       文字を大きくしたぶんの窮屈さを相殺 */

    flex-wrap: wrap;
    /* ★ 追加：狭い画面での折り返し保険 */
    justify-content: flex-end;
}

.navi-list a {
    text-decoration: none;
    position: relative;
    padding: 8px 4px;
    white-space: nowrap;
}

.navi-list a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.navi-list a:hover::after {
    transform: scaleX(1.2);
    transform-origin: left;
}

.navi-list a:link,
.navi-list a:visited {
    color: white;
}

.navi-list a:hover {
    color: #cccccc;
}

.navi-list a:active {
    color: white;
}

/* ★ 追加：現在表示中のページをハイライト */
.navi-list a.active {
    color: #c9a227;
}

.navi-list a.active::after {
    background: #c9a227;
    transform: scaleX(1);
    transform-origin: left;
}

/* ★ 追加：問い合わせをCTAボタンとして目立たせる */
.navi-list a.nav-cta {
    background-color: #c9a227;
    color: rgb(11, 40, 74);
    padding: 8px 20px;
    border-radius: 20px;
}

.navi-list a.nav-cta::after {
    display: none;
}

.navi-list a.nav-cta:hover {
    background-color: #ddb733;
    color: rgb(11, 40, 74);
}

.navi-list a.nav-cta.active {
    color: rgb(11, 40, 74);
}


/* ★ 追加：スマホ用ハンバーガーボタン */
.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
    z-index: 2;
}

.hamburger-btn span {
    display: block;
    width: 26px;
    height: 3px;
    border-radius: 2px;
    background-color: #ffffff;
    transition: transform 0.3s ease, opacity 0.2s ease;
}

.hamburger-btn.open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger-btn.open span:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}


/* ボーダーライン */
.section-line {
    width: 15%;
    min-width: 80px;
    /* ★ 追加：極端に狭くなりすぎないように */
    border: none;
    border-top: 3px solid #000000bb;
    margin: 30px auto 40px;

    transform: scaleX(0);
    transform-origin: center;
    transition: transform 1.2s ease-out;
}

.section-line.is-visible {
    transform: scaleX(1);
}


/* ★ 追加：スマホ対応（このファイルに無かったため新設） */
@media (max-width: 768px) {
    header {
        height: auto;
        min-height: 90px;
    }

    .header-container {
        flex-wrap: nowrap;
        /* ★ wrap → nowrap。ハンバーガーボタンに置き換えたので
           ロゴ・ナビが2段に折り返す必要が無くなったため */
        padding-top: 20px;
        padding-right: 6px;
        padding-bottom: 4px;
        padding-left: 2px;
        /* ★ 修正：ロゴを左端ぎりぎりまで寄せ(padding-leftを2pxまで縮小)、
           ロゴ・ハンバーガーの位置を下げるため(padding-topを増やしpadding-bottomを縮小)。
           上下の合計は変えていない(20+4=24=12+12)ため、ヘッダー自体の高さは変わらず、
           他ページのtopView等のheader高さオフセット計算に影響しない */
    }

    .logo img {
        width: 120px;
        max-height: 65px;
    }

    .hamburger-btn {
        display: flex;
        /* ★ 追加：スマホ幅ではハンバーガーボタンを表示 */
    }

    .navi-list {
        display: none;
        /* ★ 追加：普段は非表示にし、ハンバーガー操作で.openを付与して表示 */
        position: absolute;
        top: 100%;
        left: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        width: 100%;
        margin: 0;
        padding: 8px 20px 20px;
        background-color: rgb(11, 40, 74);
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
    }

    .navi-list.open {
        display: flex;
    }

    .navi-list li {
        width: 100%;
    }

    .navi-list a {
        display: block;
        width: 100%;
        padding: 14px 8px;
        text-align: center;
        font-size: 18px;
    }

    .navi-list a.nav-cta {
        margin-top: 8px;
    }
}

/* ========================================
   SEO/アクセシビリティ用：視覚的には非表示だが、
   検索エンジンやスクリーンリーダーには読み取れる見出し
======================================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
