/**
 * Navigation Component Styles
 * ナビゲーションメニューのスタイル定義
 */

/* ========================================
   Header / Fixed Header
   ======================================== */

.fixed-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

.fixed-header.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.fixed-header.header-hidden {
    transform: translateY(-100%);
}

.fixed-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* ========================================
   Logo
   ======================================== */

.logo {
    flex-shrink: 0;
}

.logo a {
    display: inline-block;
    text-decoration: none;
    color: var(--vinet-primary, #1a365d);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    transition: color 0.3s ease;
}

.logo a:hover,
.logo a:focus {
    color: var(--vinet-accent, #3182ce);
    outline: none;
}

.logo a:focus-visible {
    outline: 2px solid var(--vinet-accent, #3182ce);
    outline-offset: 4px;
    border-radius: 4px;
}

/* ========================================
   Desktop Navigation
   ======================================== */

.main-nav {
    display: none;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: inline-block;
    padding: 0.5rem 0.75rem;
    color: var(--vinet-secondary, #2d3748);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    transition: color 0.3s ease;
    cursor: pointer;
}

.nav-link:hover,
.nav-link:focus {
    color: var(--vinet-accent, #3182ce);
    outline: none;
}

.nav-link:focus-visible {
    outline: 2px solid var(--vinet-accent, #3182ce);
    outline-offset: 4px;
    border-radius: 4px;
}

/* ========================================
   Dropdown Menu (Desktop)
   ======================================== */

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    min-width: 280px;
    max-width: 320px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    z-index: 100;
    padding: 0.5rem 0;
}

.dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    color: var(--vinet-secondary, #2d3748);
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: var(--vinet-light, #f7fafc);
    outline: none;
}

.dropdown-item:focus-visible {
    outline: 2px solid var(--vinet-accent, #3182ce);
    outline-offset: -2px;
}

.dropdown-item-image {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    background-color: #e2e8f0;
}

.dropdown-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dropdown-item-info {
    flex: 1;
    min-width: 0;
}

.dropdown-item-name {
    display: block;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--vinet-secondary, #2d3748);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ========================================
   Hamburger Menu Button
   ======================================== */

.hamburger-menu {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 48px;
    height: 48px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
    transition: transform 0.3s ease;
}

.hamburger-menu:hover {
    transform: scale(1.05);
}

.hamburger-menu:focus {
    outline: 2px solid var(--vinet-accent, #3182ce);
    outline-offset: 4px;
    border-radius: 4px;
}

.hamburger-line {
    width: 24px;
    height: 2px;
    background-color: var(--vinet-secondary, #2d3748);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger-line:not(:last-child) {
    margin-bottom: 5px;
}

.hamburger-menu.active .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger-menu.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

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

/* ========================================
   Member Card Highlight Effect
   ======================================== */

.member-card.highlighted {
    animation: highlight-pulse 2s ease;
}

@keyframes highlight-pulse {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    50% {
        box-shadow: 0 4px 20px rgba(49, 130, 206, 0.4);
        transform: scale(1.02);
    }
}

/* ========================================
   Responsive Design
   ======================================== */

/* Tablet and Desktop */
@media (min-width: 769px) {
    .main-nav {
        display: block;
    }
    
    .hamburger-menu {
        display: none;
    }
    
    .mobile-menu {
        display: none;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .fixed-header .container {
        padding: 0.75rem 1rem;
    }
    
    .logo a {
        font-size: 1.25rem;
    }
    
    .main-nav {
        display: none;
    }
}

/* Small Mobile */
@media (max-width: 375px) {
    .mobile-nav {
        width: 90%;
    }
    
    .mobile-nav-link {
        padding: 0.875rem 1rem;
        font-size: 0.95rem;
    }
    
    .mobile-dropdown-item {
        padding: 0.625rem 1rem 0.625rem 2rem;
    }
}

/* Large Desktop */
@media (min-width: 1200px) {
    .fixed-header .container {
        max-width: 1400px;
    }
    
    .nav-list {
        gap: 2.5rem;
    }
    
    .nav-link {
        font-size: 1rem;
    }
}

/* ========================================
   Accessibility Enhancements
   ======================================== */

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .fixed-header {
        border-bottom: 2px solid currentColor;
    }
    
    .nav-link:focus-visible,
    .dropdown-item:focus-visible,
    .mobile-nav-link:focus-visible {
        outline-width: 3px;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .fixed-header,
    .dropdown-menu,
    .hamburger-line,
    .mobile-menu,
    .mobile-nav,
    .mobile-dropdown,
    .nav-link,
    .dropdown-item,
    .mobile-nav-link {
        transition: none;
    }
    
    .member-card.highlighted {
        animation: none;
        box-shadow: 0 4px 20px rgba(49, 130, 206, 0.4);
    }
}

/* Focus Visible Polyfill */
.nav-link:focus:not(:focus-visible),
.dropdown-item:focus:not(:focus-visible),
.mobile-nav-link:focus:not(:focus-visible),
.hamburger-menu:focus:not(:focus-visible) {
    outline: none;
}

/* ========================================
   Print Styles
   ======================================== */

@media print {
    .fixed-header {
        position: static;
        box-shadow: none;
    }
    
    .hamburger-menu,
    .mobile-menu {
        display: none;
    }
    
    .main-nav {
        display: none;
    }
}


/* ========================================
   Mobile Navigation - Design Mock Style
   ======================================== */

.mobile-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 100vw;
    height: 100vh;
    background-image: url('/img/bg_black.png');
    background-size: cover;
    background-position: left bottom;
    background-repeat: no-repeat;
    overflow: hidden;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.mobile-nav ul {
    list-style: none;
    margin: 0;
    padding: 0 10px 10dvh 10px; /* 左右に10px、下部に20dvhの余白 */
    text-align: center;
    width: 100%;
}

.mobile-nav li {
    height: 10dvh;
    display: flex;
    align-items: center;
    margin: 0;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.mobile-nav a {
    text-decoration: none;
    color: white;
    display: block;
    text-align: left;
    width: 100%;
    transition: color 0.3s ease;
}

.mobile-nav .menu-title {
    font-size: 2rem; /* 1.5rem → 2rem に拡大 */
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: -10px;
}

.mobile-nav .menu-subtitle {
    font-size: 1.125rem; /* 0.875rem → 1.125rem に拡大 */
    font-weight: 700;
    opacity: 0.8;
    letter-spacing: 0.02em;
}

.mobile-nav a:hover,
.mobile-nav a:focus {
    color: rgba(255, 255, 255, 0.8);
}

.mobile-nav a:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 4px;
    border-radius: 4px;
}

/* モバイルメニュー展開時 */
.mobile-nav.open {
    transform: translateX(0);
    pointer-events: auto;
}

.mobile-nav.open li {
    opacity: 1;
    transform: translateY(0);
}

/* メニューの遅延表示アニメーション */
.mobile-nav.open li:nth-child(1) {
    transition-delay: 0.1s;
}

.mobile-nav.open li:nth-child(2) {
    transition-delay: 0.15s;
}

.mobile-nav.open li:nth-child(3) {
    transition-delay: 0.2s;
}

.mobile-nav.open li:nth-child(4) {
    transition-delay: 0.25s;
}

.mobile-nav.open li:nth-child(5) {
    transition-delay: 0.3s;
}

.mobile-nav.open li:nth-child(6) {
    transition-delay: 0.35s;
}

/* デスクトップでは完全非表示 */
@media (min-width: 761px) {
    .mobile-nav {
        display: none !important;
    }
}
