/* ナビゲーション専用スタイル - モバイルファースト */

/* ヘッダー全体 */
.site-header {
    background: linear-gradient(135deg, var(--wa-secondary) 0%, var(--wa-accent) 100%);
    padding: 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 9999;
    box-shadow: 0 4px 20px rgba(220, 20, 60, 0.15);
    transition: all 0.3s ease;
}

.site-header .container {
    padding: 0;
}

/* ヘッダーインナー */
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

/* ロゴ・サイトタイトル */
.site-branding {
    flex-shrink: 0;
    z-index: 10001;
}

.site-title {
    font-family: 'Klee One', cursive;
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0;
    transform: rotate(-2deg);
    transition: transform 0.3s ease;
}

.site-title a {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.site-title a::before {
    content: '🌸';
    font-size: 1.5rem;
    animation: sakura-float 3s ease-in-out infinite;
}

@keyframes sakura-float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-5px) rotate(10deg);
    }
}

.site-title:hover {
    transform: rotate(0deg) scale(1.05);
}

/* モバイルメニューボタン */
.menu-toggle {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    border-radius: 15px;
    padding: 0;
    cursor: pointer;
    position: relative;
    z-index: 10001;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.menu-toggle-inner {
    width: 24px;
    height: 20px;
    position: relative;
}

.menu-toggle-inner span {
    display: block;
    width: 100%;
    height: 3px;
    background: white;
    border-radius: 3px;
    position: absolute;
    transition: all 0.3s ease;
}

.menu-toggle-inner span:nth-child(1) {
    top: 0;
}

.menu-toggle-inner span:nth-child(2) {
    top: 50%;
    transform: translateY(-50%);
}

.menu-toggle-inner span:nth-child(3) {
    bottom: 0;
}

/* メニューオープン時のハンバーガーアニメーション */
.menu-toggle.active .menu-toggle-inner span:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

.menu-toggle.active .menu-toggle-inner span:nth-child(2) {
    opacity: 0;
    transform: translateY(-50%) scale(0);
}

.menu-toggle.active .menu-toggle-inner span:nth-child(3) {
    bottom: 50%;
    transform: translateY(50%) rotate(-45deg);
}

/* モバイルナビゲーション */
.main-navigation {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 350px;
    height: 100vh;
    background: linear-gradient(180deg, var(--wa-secondary) 0%, var(--wa-accent) 100%);
    transition: right 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 10000;
    overflow-y: auto;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.3);
}

.main-navigation.active {
    right: 0;
}

/* メニューリスト */
.main-navigation ul {
    list-style: none;
    padding: 100px 0 40px;
    margin: 0;
}

.main-navigation li {
    opacity: 0;
    transform: translateX(50px);
    animation: slideIn 0.5s ease forwards;
}

.main-navigation.active li {
    opacity: 1;
    transform: translateX(0);
}

.main-navigation li:nth-child(1) { animation-delay: 0.1s; }
.main-navigation li:nth-child(2) { animation-delay: 0.15s; }
.main-navigation li:nth-child(3) { animation-delay: 0.2s; }
.main-navigation li:nth-child(4) { animation-delay: 0.25s; }
.main-navigation li:nth-child(5) { animation-delay: 0.3s; }
.main-navigation li:nth-child(6) { animation-delay: 0.35s; }

@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.main-navigation a {
    display: block;
    padding: 18px 30px;
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    font-family: 'Zen Maru Gothic', sans-serif;
    font-weight: 500;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.main-navigation a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transition: width 0.3s ease;
}

.main-navigation a:hover::before,
.main-navigation a:focus::before {
    width: 100%;
}

.main-navigation a:hover,
.main-navigation a:focus {
    padding-left: 40px;
    background: rgba(255, 255, 255, 0.05);
}

/* 外部リンクスタイル */
.main-navigation a[target="_blank"] {
    padding-right: 50px;
}

.main-navigation .external-link-icon {
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
}

/* オーバーレイ */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 9998;
    backdrop-filter: blur(5px);
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* タブレット以上のサイズ */
@media (min-width: 768px) {
    .header-inner {
        padding: 20px 30px;
    }
    
    .site-title {
        font-size: 2.2rem;
    }
    
    .main-navigation {
        width: 400px;
        max-width: 400px;
    }
    
    .main-navigation a {
        padding: 20px 40px;
        font-size: 1.2rem;
    }
}

/* デスクトップサイズ */
@media (min-width: 1024px) {
    .site-header {
        padding: 0;
    }
    
    .header-inner {
        padding: 0 20px;
        height: 80px;
    }
    
    .menu-toggle {
        display: none;
    }
    
    .main-navigation {
        position: static;
        width: auto;
        max-width: none;
        height: auto;
        background: transparent;
        box-shadow: none;
        overflow: visible;
        opacity: 1;
        transform: none;
    }
    
    .main-navigation ul {
        display: flex;
        padding: 0;
        gap: 3px;
        align-items: center;
        flex-wrap: nowrap;
    }
    
    .main-navigation li {
        opacity: 1;
        transform: none;
        animation: none;
    }
    
    .main-navigation a {
        padding: 10px 15px;
        border: none;
        border-radius: 25px;
        font-size: 0.9rem;
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
        transition: all 0.3s ease;
        white-space: nowrap;
    }
    
    .main-navigation a:hover,
    .main-navigation a:focus {
        background: rgba(255, 255, 255, 0.25);
        transform: translateY(-2px);
        padding-left: 15px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    }
    
    .main-navigation a[target="_blank"] {
        padding-right: 15px;
    }
    
    .main-navigation .external-link-icon {
        position: static;
        display: inline-block;
        margin-left: 5px;
        transform: none;
    }
    
    .menu-overlay {
        display: none;
    }
}

/* スクロール時のヘッダー縮小 */
.site-header.scrolled {
    padding: 0;
    background: linear-gradient(135deg, var(--wa-secondary) 0%, var(--wa-accent) 100%);
    box-shadow: 0 2px 20px rgba(220, 20, 60, 0.2);
}

.site-header.scrolled .header-inner {
    height: 60px;
}

.site-header.scrolled .site-title {
    font-size: 1.5rem;
}

@media (min-width: 768px) {
    .site-header.scrolled .site-title {
        font-size: 1.8rem;
    }
}

@media (min-width: 1024px) {
    .site-header.scrolled .header-inner {
        height: 65px;
    }
    
    .site-header.scrolled .main-navigation a {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
}

/* アクセシビリティ */
.main-navigation a:focus {
    outline: 2px solid white;
    outline-offset: 2px;
}

/* メニューアイテムのアイコン */
.main-navigation a::after {
    content: '→';
    margin-left: 5px;
    display: inline-block;
    transition: transform 0.3s ease;
    opacity: 0;
}

.main-navigation a:hover::after {
    transform: translateX(5px);
    opacity: 1;
}

/* 現在のページ表示 */
.main-navigation .current-menu-item a,
.main-navigation .current_page_item a {
    background: rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

/* ロゴアニメーション */
@keyframes logo-pulse {
    0%, 100% {
        transform: scale(1) rotate(-2deg);
    }
    50% {
        transform: scale(1.05) rotate(-2deg);
    }
}

.site-header:hover .site-title {
    animation: logo-pulse 2s ease-in-out infinite;
}

/* モバイルメニュー内の装飾 */
.main-navigation::before {
    content: '✨';
    position: absolute;
    top: 40px;
    right: 30px;
    font-size: 30px;
    opacity: 0.3;
    animation: twinkle 2s ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.2);
    }
}

/* ページ本体のマージン調整 */
body {
    padding-top: 70px;
}

body.menu-open {
    overflow: hidden;
}

@media (min-width: 1024px) {
    body {
        padding-top: 80px;
    }
}

/* 大画面用の追加調整 */
@media (min-width: 1200px) {
    .header-inner {
        padding: 0 30px;
    }
    
    .main-navigation ul {
        gap: 5px;
    }
    
    .main-navigation a {
        padding: 10px 18px;
        font-size: 0.95rem;
    }
}

/* 超大画面用 */
@media (min-width: 1440px) {
    .header-inner {
        padding: 0 40px;
    }
    
    .main-navigation a {
        padding: 12px 20px;
        font-size: 1rem;
    }
}

/* スクリーンリーダー用 */
.screen-reader-text {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.screen-reader-text:focus {
    position: absolute;
    left: 6px;
    top: 7px;
    z-index: 999999;
    width: auto;
    height: auto;
    padding: 15px 20px;
    font-size: 14px;
    font-weight: bold;
    text-decoration: none;
    background: white;
    color: var(--wa-secondary);
    border: 2px solid var(--wa-secondary);
    border-radius: 3px;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
}