/* =========================================
   Header
   ========================================= */
.header {
    background-color: var(--white);
    height: var(--header-height);
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.header__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
}

.header__logo img {
    height: 40px;
    width: auto;
    vertical-align: sub;
}

.header__nav {
    margin-left: auto;
}

.header__nav-list {
    display: flex;
    align-items: center;
    gap: 30px;
}

.header__nav-list a {
    font-weight: 700;
    color: var(--primary-color);
}

.header__contact-btn {
    background-color: var(--primary-color);
    color: var(--white) !important;
    padding: 10px 20px;
    border-radius: 4px;
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    align-items: center;
    margin-left: 20px;
    border: 1px solid #ccc;
    border-radius: 4px;
    overflow: hidden;
}

.lang-switcher__item {
    display: block;
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-color);
    text-decoration: none;
    border-right: 1px solid #ccc;
    transition: background-color 0.2s, color 0.2s;
    white-space: nowrap;
}

.lang-switcher__item:last-child {
    border-right: none;
}

.lang-switcher__item:hover {
    background-color: var(--bg-light);
}

.lang-switcher__item.current {
    background-color: var(--primary-color);
    color: var(--white);
    pointer-events: none;
}

.header__hamburger {
    display: none; /* Hide on Desktop */
}


/* =========================================
   Footer
   ========================================= */
.footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 60px 0 20px;
}

.footer__container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.footer__logo-area {
    width: 250px;
    margin-bottom: 30px;
}

.footer__logo img {
    max-width: 150px;
    filter: brightness(0) invert(1); /* ロゴを白くする */
    margin-bottom: 10px;
}

.footer__links {
    display: flex;
    gap: 60px;
}

.footer__link-list li {
    margin-bottom: 10px;
}

.footer__link-list a {
    opacity: 0.8;
}

.footer__link-list a:hover {
    opacity: 1;
    text-decoration: underline;
}

.footer__contact-info {
    text-align: right;
    margin-right: 40px;
}

.footer__phone {
    display: flex;
    font-size: 1.2rem;
    font-weight: 700;
}

.footer__phone img {
    align-self: center;
    margin-right: 10px;
    height: 20px;
    width: auto;
    filter: invert(100%);
}

.footer__email {
    display: flex;
    font-size: 1.2rem;
    font-weight: 500;
}
.footer__email img {
    align-self: center;
    margin-right: 10px;
    height: 20px;
    width: auto;
    filter: invert(100%);
}

.footer__copyright {
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    font-size: 0.8rem;
    opacity: 0.6;
}


/* =========================================
   Responsive Design (Mobile)
   ========================================= */
@media (max-width: 768px) {
    /* Header */
    .header__nav {
        display: none; /* ハンバーガーメニュー実装時にJSで制御 */
    }

    .lang-switcher {
        margin-left: auto;
        margin-right: 12px;
    }

    .lang-switcher__item {
        padding: 5px 8px;
        font-size: 0.7rem;
    }

    .header__hamburger {
        display: block;
        width: 30px;
        height: 20px;
        position: relative;
        cursor: pointer;
    }

    .header__hamburger span {
        display: block;
        width: 100%;
        height: 2px;
        background-color: var(--primary-color);
        margin-bottom: 6px;
    }


    /* Footer */
    .footer__container {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    .footer__links {
        flex-direction: column;
        gap: 20px;
        margin-bottom: 30px;
    }
    .footer__contact-info {
        text-align: center;
    }
    
    
    /* Header */
    .header__nav {
        display: none;
        /* ▼▼▼ ★追記: activeクラスがついた時のスタイル ▼▼▼ */
        position: absolute;
        top: var(--header-height); /* ヘッダーの高さ分下げる */
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: var(--white);
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        padding: 50px 0;
    }

    /* メニューが開いているときは表示する */
    .header__nav.active {
        display: block;
        animation: fadeIn 0.3s ease; /* ふわっと表示させる（任意） */
    }

    /* スマホ時はメニューを縦並びにする */
    .header__nav.active .header__nav-list {
        flex-direction: column;
        gap: 40px;
        text-align: center;
    }
    /* ▲▲▲ ★追記ここまで ▲▲▲ */

    .header__hamburger {
        display: block;
        width: 30px;
        height: 20px; /* 全体の高さ */
        position: relative;
        cursor: pointer;
        z-index: 1001; /* メニューより手前に表示 */
    }

    .header__hamburger span {
        display: block;
        width: 100%;
        height: 2px;
        background-color: var(--primary-color);
        /* アニメーションのために絶対配置に変更するか、transitionを追加 */
        transition: all 0.3s ease-in-out;
        position: absolute; /* 位置を調整しやすくするため絶対配置推奨 */
        left: 0;
    }

    /* ▼▼▼ ★修正: 3本線の配置をCSSで綺麗に指定し直すことを推奨 ▼▼▼ */
    /* 元の margin-bottom 指定だと×印にする計算が難しいため、top指定に変更します */

    .header__hamburger span:nth-child(1) {
        top: 0;
    }
    .header__hamburger span:nth-child(2) {
        top: 9px; /* 真ん中 */
    }
    .header__hamburger span:nth-child(3) {
        top: 18px; /* 下 */
    }

    /* ▼▼▼ ★追記: ハンバーガーが×印になるアニメーション ▼▼▼ */
    .header__hamburger.active span:nth-child(1) {
        top: 9px;
        transform: rotate(45deg);
    }

    .header__hamburger.active span:nth-child(2) {
        opacity: 0; /* 真ん中の線を消す */
    }

    .header__hamburger.active span:nth-child(3) {
        top: 9px;
        transform: rotate(-45deg);
    }
    /* ▲▲▲ ★追記ここまで ▲▲▲ */
}

/* ふわっと表示するアニメーション定義（なくても動きます） */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}