/* ==========================================================================
   NAVIGATION STYLES - メニュー・ナビゲーション
   ========================================================================== */

/* Navigation Container */
#nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 2px solid #532a14;
    z-index: 1000;
    transition: all 0.3s ease;
}

#nav.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 20px rgba(83, 42, 20, 0.1);
}

.nav-container {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 2rem;
    height: 70px;
    position: relative;
}

/* Desktop Menu */
.desktop-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
}

.desktop-menu li {
    margin: 0;
}

.desktop-menu a {
    display: block;
    padding: 1rem 1.5rem;
    color: #532a14;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    border: 2px solid transparent !important;
    border-radius: 25px;
    transition: all 0.2s ease;
    position: relative;
}

.desktop-menu a:hover,
.desktop-menu a.active {
    background: #532a14;
    color: #ffffff;
    border: 2px solid #532a14 !important;
    box-shadow: 0 3px 8px rgba(83, 42, 20, 0.2);
}

.desktop-menu a.current {
    background: #532a14 !important;
    color: #ffffff !important;
    border: 2px solid #532a14 !important;
    box-shadow: 0 2px 5px rgba(83, 42, 20, 0.2);
}

/* Hamburger Menu Button */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
    background: none;
    border: none;
    position: absolute;
    right: 2rem;
    width: 40px;
    height: 40px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #532a14;
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
    display: block;
    transform-origin: center center;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: scale(0);
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    width: 100%;
    background: #ffffff;
    border-bottom: 2px solid #532a14;
    box-shadow: 0 5px 20px rgba(83, 42, 20, 0.15);
    z-index: 999;
    
    /* 初期状態：非表示 */
    display: none;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
}

.mobile-menu.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.mobile-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-nav-list li {
    border-bottom: 1px solid rgba(83, 42, 20, 0.1);
}

.mobile-nav-list li:last-child {
    border-bottom: none;
}

.mobile-nav-list a {
    display: block;
    padding: 20px 30px;
    color: #532a14;
    text-decoration: none;
    font-weight: 600;
    font-size: 18px;
    transition: all 0.2s ease;
    position: relative;
    border: none !important;
    background: transparent;
}

.mobile-nav-list a:hover,
.mobile-nav-list a.active {
    background: #f5f5f5;
    color: #532a14;
    padding-left: 35px;
}

.mobile-nav-list a.current {
    background: #532a14 !important;
    color: #ffffff !important;
    padding-left: 35px;
}

.mobile-nav-list a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #532a14;
    transform: scaleY(0);
    transition: transform 0.2s ease;
}

.mobile-nav-list a:hover::before,
.mobile-nav-list a.current::before {
    transform: scaleY(1);
    background: #ffffff;
}

.mobile-nav-list a.current::before {
    background: #ffffff;
}

/* Overlay */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.3);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Body padding for fixed nav */
body {
    padding-top: 70px;
}

html {
    scroll-behavior: smooth;
}

body.menu-open {
    overflow: hidden;
}

/* Desktop Responsive */
@media screen and (max-width: 1024px) {
    .nav-container {
        padding: 0 1.5rem;
    }
    
    .desktop-menu {
        gap: 1.5rem;
    }
    
    .desktop-menu a {
        padding: 0.8rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .hamburger {
        right: 1.5rem;
    }
}

/* Tablet and Mobile Styles */
@media screen and (max-width: 768px) {
    .nav-container {
        padding: 0 1rem;
        height: 60px;
        justify-content: center;
    }
    
    .hamburger {
        display: flex !important;
    }
    
    body {
        padding-top: 60px;
    }
    
    .desktop-menu {
        display: none !important;
    }
    
    .mobile-menu {
        top: 60px;
    }
    
    .mobile-nav-list a {
        padding: 15px 25px;
        font-size: 16px;
    }
    
    .mobile-nav-list a:hover,
    .mobile-nav-list a.current {
        padding-left: 30px;
    }
}

@media screen and (max-width: 480px) {
    .nav-container {
        padding: 0 0.5rem;
    }
    
    .mobile-nav-list a {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .mobile-nav-list a:hover,
    .mobile-nav-list a.current {
        padding-left: 30px;
    }
    
    .hamburger span {
        width: 20px;
        height: 2px;
    }
}