/* ========================================
   ヘッダー - モバイルファースト
   ======================================== */

/* ベース・モバイル */
.header {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

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

/* ロゴ（画像）- クリックで index.html へ */
.logo {
    display: block;
    text-decoration: none;
    line-height: 0;
}

.logo img {
    display: block;
    height: 42px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
    object-position: left center;
    transition: opacity 0.2s;
}

.logo:hover img,
.logo:focus-visible img {
    opacity: 0.85;
}

/* ハンバーガーボタン - モバイルで表示 */
.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: transparent;
    border: none;
    cursor: pointer;
    border-radius: 0;
    transition: background 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.hamburger:hover {
    background: rgba(0, 0, 0, 0.05);
}

.hamburger-line {
    display: block;
    width: 22px;
    height: 2px;
    background: #1a1a1a;
    border-radius: 1px;
    transition: transform 0.25s, opacity 0.25s;
}

/* ハンバーガー open 時 */
.header.is-open .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.header.is-open .hamburger-line:nth-child(2) {
    opacity: 0;
}

.header.is-open .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ナビ - モバイルではオーバーレイメニュー */
.nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.5);
    visibility: hidden;
    opacity: 0;
    transition: visibility 0.25s, opacity 0.25s;
    pointer-events: none;
}

.header.is-open .nav {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.nav-list {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(280px, 85vw);
    margin: 0;
    padding: 70px 24px 24px;
    list-style: none;
    background: #fff;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: transform 0.25s ease;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.header.is-open .nav-list {
    transform: translateX(0);
}

.nav-list a {
    display: block;
    padding: 14px 12px;
    color: #1a1a1a;
    text-decoration: none;
    font-size: 1rem;
    border-radius: 0;
    transition: background 0.2s, color 0.2s;
}

.nav-list a:hover,
.nav-list a:focus-visible {
    background: rgba(0, 0, 0, 0.06);
    color: #000;
}

/* 電話ボタン - モバイルメニュー内 */
.nav-phone {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.phone-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 20px;
    background: #D63A00;
    color: #fff !important;
    font-weight: 600;
    border-radius: 0;
    white-space: nowrap;
    transition: background 0.2s, filter 0.2s;
}

.phone-btn:hover,
.phone-btn:focus-visible {
    background: #B82E00;
    color: #fff !important;
    filter: brightness(1.05);
}

/* デスクトップ: ハンバーガー非表示・ナビ横並び */
@media (min-width: 768px) {
    .hamburger {
        display: none;
    }

    .nav {
        position: static;
        background: transparent;
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
        margin-left: auto;
    }

    .nav-list {
        position: static;
        width: auto;
        padding: 0;
        margin: 0;
        box-shadow: none;
        transform: none;
        flex-direction: row;
        align-items: center;
        gap: 0;
    }

    .nav-list a {
        padding: 10px 14px;
        font-size: 0.9375rem;
    }

    .nav-phone {
        margin-top: 0;
        padding-top: 0;
        border-top: none;
        margin-left: 8px;
    }

    .phone-btn {
        padding: 10px 18px;
        font-size: 0.9375rem;
        border-radius: 0;
    }

    .header-inner {
        padding: 14px 24px;
    }

    .logo img {
        height: 48px;
        max-width: 260px;
    }
}

@media (min-width: 1024px) {
    .nav-list a {
        padding: 10px 18px;
    }

    .phone-btn {
        padding: 10px 22px;
        border-radius: 0;
    }
}
