/* Header Navigation Layout Improvements */

/* Language Switcher Container - 正しい配置 */
#language-switcher-container {
    position: absolute;
    right: 20px;  /* より右に移動 */
    top: 35%;     /* より上に移動 */
    transform: translateY(-50%);
    z-index: 1100;
}

/* ナビゲーションリストの調整 */
.nav__list {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-right: 120px; /* 言語切り替えボタンのスペース確保 */
}

/* お問い合わせボタンの調整 */
.nav__cta {
    margin-left: 1rem;
    margin-right: 0;
    padding: 0.5rem 1.25rem;
    background: var(--primary-color);
    color: white;
    border-radius: 25px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.nav__cta:hover {
    background: var(--accent-turquoise);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 言語切り替えボタンのスタイル調整 */
.language-switcher {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.language-switcher__button {
    padding: 0.5rem;
    background: transparent;
    border: 2px solid var(--gray-300);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 60px;
}

.language-switcher__button:hover {
    border-color: var(--primary-color);
    background: var(--gray-50);
}

/* レスポンシブ対応 */
@media screen and (max-width: 1200px) {
    .nav__list {
        margin-right: 100px;
        gap: 1rem;
    }
    
    .nav__link {
        font-size: 0.95rem;
    }
}

@media screen and (max-width: 968px) {
    #language-switcher-container {
        position: relative;
        right: auto;
        top: auto;
        transform: none;
        margin-top: 1rem;
        order: -1; /* モバイルでは最初に表示 */
    }
    
    .nav__list {
        margin-right: 0;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .nav__cta {
        margin-left: 0;
        margin-top: 1rem;
        width: 100%;
        text-align: center;
    }
}

/* ナビゲーションアイテムのホバー効果 */
.nav__link {
    position: relative;
    padding: 0.5rem 0.75rem;
    transition: color 0.3s ease;
}

.nav__link:not(.nav__cta):hover {
    color: var(--primary-color);
}

.nav__link:not(.nav__cta)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.nav__link:not(.nav__cta):hover::after,
.nav__link.active:not(.nav__cta)::after {
    width: 80%;
}

/* ヘッダーの固定とスクロール時の影 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: box-shadow 0.3s ease;
}

.header.scrolled {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

/* ナビゲーションコンテナ */
.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    padding: 0 2rem;
}

/* ロゴスタイル */
.nav__logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav__logo:hover {
    color: var(--primary-color);
}

/* メニューコンテナ */
.nav__menu {
    display: flex;
    align-items: center;
    flex-grow: 1;
    justify-content: center;
}

/* モバイルメニュートグル */
.nav__toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-700);
    cursor: pointer;
    padding: 0.5rem;
}

@media screen and (max-width: 968px) {
    .nav__toggle {
        display: block;
        position: absolute;
        right: 1rem;
        z-index: 1101;
    }
    
    .nav__menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 400px;
        height: 100vh;
        background: white;
        box-shadow: -2px 0 20px rgba(0, 0, 0, 0.1);
        padding: 5rem 2rem 2rem;
        transition: right 0.3s ease;
        z-index: 1100;
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        overflow-y: auto;
    }
    
    .nav__menu.show {
        right: 0;
    }
    
    .nav__close {
        position: absolute;
        top: 1rem;
        right: 1rem;
        background: none;
        border: none;
        font-size: 1.5rem;
        color: var(--gray-700);
        cursor: pointer;
        padding: 0.5rem;
    }
    
    .nav__overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        display: none;
        z-index: 1099;
    }
    
    .nav__overlay.show {
        display: block;
    }
}