/* ====================
   ナビゲーションスタイル
   ==================== */

.custom-navbar {
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--nav-shadow);
    padding: 1rem 0;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    /* レイアウトシフト防止のため最小高さを固定 */
    min-height: 80px;
}


/* ブランド */
.navbar-brand {
    text-decoration: none !important;
}

.navbar-brand:hover {
    text-decoration: none !important;
}

.brand-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    width: 50px;
    height: 50px;
    transition: opacity 0.3s ease, filter 0.3s ease;
}

.brand-text {
    font-family: "Noto Sans JP", sans-serif;
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--primary-color);
    letter-spacing: 0.5px;
    text-decoration: none !important;
}

.navbar-brand:hover .brand-logo {
    /* transform: scale(1.05); レイアウトシフト防止のため削除 */
    opacity: 0.9;
    filter: brightness(1.1);
}

.navbar-brand:hover .brand-text {
    color: var(--primary-color-darker);
    text-decoration: none !important;
}

/* ヘッダーナビリンク */
.header-nav-link {
    position: relative;
    color: var(--primary-color) !important;
    font-weight: 500;
    padding: 0.7rem 0.8rem !important;
    border-radius: 25px;
    transition: all 0.3s ease;
    margin: 0 0.1rem;
    text-decoration: none !important;
    font-size: 0.95rem;
    /* レイアウトシフト防止のため最小高さを固定 */
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-nav-link:hover {
    color: white !important;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-color-darker));
    /* transform: translateY(-2px); レイアウトシフト防止のため削除 */
    box-shadow: 0 4px 15px rgba(182, 122, 111, 0.3);
    text-decoration: none !important;
}

.header-nav-link i {
    font-size: 1rem;
    opacity: 1;
}

.header-nav-link:hover i {
    opacity: 1;
}

/* ソーシャルリンク */
.social-nav {
    gap: 0.5rem;
}

.social-link {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    color: var(--primary-color) !important;
    transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
    margin: 0 0.2rem !important;
    padding: 0 !important;
    text-decoration: none !important;
    /* レイアウトシフト防止のため固定サイズを維持 */
    flex-shrink: 0;
}

.social-link:hover {
    background: var(--primary-color);
    color: white !important;
    /* transform: translateY(-3px); レイアウトシフト防止のため削除 */
    box-shadow: 0 6px 20px rgba(182, 122, 111, 0.4);
    text-decoration: none !important;
}

.social-link i {
    font-size: 1.2rem;
}

/* カスタムハンバーガーメニュー */
.custom-toggler {
    border: none;
    padding: 6px 10px;
    background: transparent;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    outline: none !important;
    box-shadow: none !important;
}

.custom-toggler-icon {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
    transition: none;
}

.custom-toggler:hover .custom-toggler-icon {
    background: var(--primary-color-darker);
}

.custom-toggler:focus {
    outline: none !important;
    box-shadow: none !important;
}

.custom-toggler[aria-expanded="true"] .custom-toggler-icon:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.custom-toggler[aria-expanded="true"] .custom-toggler-icon:nth-child(2) {
    opacity: 0;
}

.custom-toggler[aria-expanded="true"] .custom-toggler-icon:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* 中間サイズ調整 */
@media (max-width: 1200px) and (min-width: 992px) {
    .header-nav-link {
        padding: 0.7rem 0.8rem !important;
        font-size: 0.9rem;
        margin: 0 0.1rem;
    }
}

@media (max-width: 991px) and (min-width: 768px) {
    .header-nav-link {
        padding: 0.6rem 0.5rem !important;
        font-size: 0.85rem;
        margin: 0;
        white-space: nowrap;
    }
    
    .brand-text {
        font-size: 1.1rem;
    }
    
    .brand-logo {
        width: 42px;
        height: 42px;
    }
    
    .social-link {
        width: 36px;
        height: 36px;
        margin: 0 0.1rem !important;
    }
    
    .social-link i {
        font-size: 1rem;
    }
    
    .navbar-nav {
        gap: 0;
    }
}

/* 狭い中間サイズ（アイコンのみ表示） */
@media (max-width: 900px) and (min-width: 768px) {
    .header-nav-link span {
        display: none;
    }
    
    .header-nav-link {
        padding: 0.6rem !important;
        width: 45px;
        height: 45px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 25px;
    }
    
    .header-nav-link i {
        margin: 0 !important;
        font-size: 1.1rem;
    }
}

/* モバイル対応 */
@media (max-width: 767.98px) {
    .custom-navbar {
        margin-bottom: 1rem;
    }
    
    .navbar-collapse {
        background: white;
        border-radius: 12px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        margin-top: 1rem;
        padding: 1.5rem;
    }
    
    /* Bootstrapのcollapseアニメーションを無効化 */
    .navbar-collapse.collapsing {
        transition: none !important;
    }
    
    .navbar-collapse.collapse {
        transition: none !important;
    }
    
    .header-nav-link {
        margin: 0.3rem 0;
        text-align: center;
    }
    
    /* ハンバーガーメニュー内のSNSボタン（日本語版） */
    .navbar-collapse .social-nav {
        justify-content: center;
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid #eee;
    }

    /* 直接表示のSNSボタン（英語版） */
    .navbar > .container > .social-nav {
        margin-top: 0;
        padding-top: 0;
        border-top: none;
    }
    
    .brand-text {
        font-size: 1.2rem;
    }
    
    .brand-logo {
        width: 45px;
        height: 45px;
    }
}

.navbar-nav {
    align-items: center;
}