/* ===============================
   NAVIGATION STYLES - Logo, Menu & Nav
   ナビゲーション - ロゴ・メニュー・ナビ
   =============================== */

/* ロゴのスタイル */
.logo-container {
    position: fixed;
    top: 40px;
    left: 40px;
    z-index: 10000;
    display: flex;
    align-items: center;
    height: 48px; /* ナビゲーションメニューと同じ高さ */
/*    background: transparent;*/ /* 背景を透明に */
}

.logo {
    height: 150px;
    width: auto;
    transition: transform 0.2s ease-out, opacity 0.2s ease-out;
    will-change: transform, opacity;
}

.logo:hover {
    transform: scale(1.1);
}

/* サービスページでのロゴ非表示制御（レガシー - 新しいスクロール制御で置き換え） */
.logo.hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease-out;
}

/* PC版：押し出されるようなスムーズなロゴアニメーション */
@media (min-width: 481px) {
    .logo {
        transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                   opacity 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        will-change: transform, opacity;
    }
    
    /* ホバー時の拡大も滑らかに */
    .logo:hover {
        transform: scale(1.05);
        transition: transform 0.2s ease-out;
    }
}

/* ハンバーガーメニューボタン */
.hamburger-menu {
    position: fixed;
    top: 40px;
    right: 40px;
    z-index: 10000;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(12px);
}

.hamburger-menu:hover {
    background: rgba(78, 205, 196, 0.2);
    border-color: rgba(78, 205, 196, 0.4);
    transform: translateY(-2px) scale(1.1);
    box-shadow: 0 6px 20px rgba(78, 205, 196, 0.2);
}

.hamburger-menu span {
    display: block;
    width: 20px;
    height: 2px;
    background: rgba(51, 51, 51, 0.55);
    margin: 2px 0;
    transition: all 0.3s ease;
    transform-origin: center;
    border-radius: 1px;
}

.hamburger-menu:hover span {
    background: #fff;
}

/* ハンバーガーメニューのアニメーション */
.hamburger-menu.active {
    background: rgba(220, 53, 69, 0.9);
    border-color: #dc3545;
    transform: scale(1.05);
}

.hamburger-menu.active span {
    background: #fff;
}

.hamburger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
}

/* ナビゲーションメニュー */
.main-nav {
    position: fixed;
    top: 0;
    right: -80%;
    width: 80%;
    height: 100vh;
    min-height: 100vh;
    max-height: 100vh;
    background: transparent;
    z-index: 9999;
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    overflow: hidden;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.main-nav.active {
    right: 0;
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

/* ナビゲーション背景Canvas */
.nav-background-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5000;
    pointer-events: auto;
    cursor: default;
    opacity: 0;
    transform: translateX(100%);
    transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.nav-background-canvas.active {
    opacity: 1;
    transform: translateX(0);
}

.main-nav ul {
    display: flex;
    flex-direction: column;
    list-style: none;
    gap: 0;
    margin: 0;
    padding: 0;
    align-items: flex-start;
    z-index: 10001;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.main-nav li {
    position: fixed;
    transform-origin: center;
    opacity: 0;
    transform: translate(120%, -50%);
    transition: transform 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                opacity 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 10003;
    pointer-events: auto;
}

.main-nav.active li {
    opacity: 1 !important;
    transform: translate(0, -50%);
    visibility: visible !important;
    display: block !important;
}

.main-nav a {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 600;
    font-size: 20px;
    transition: all 0.3s ease;
    position: relative;
    padding: 12px 20px;
    display: block;
    text-align: left;
    z-index: 10002;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    width: 180px;
    box-sizing: border-box;
    backdrop-filter: blur(8px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 25px;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #4ecdc4, #44a08d);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.main-nav a:hover {
    color: #4ecdc4;
    background: rgba(78, 205, 196, 0.2);
    border-color: rgba(78, 205, 196, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(78, 205, 196, 0.2);
}

.main-nav a:hover::after {
    width: 90%;
}

/* ナビゲーション用のCanvas */
.nav-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5001;
    pointer-events: auto;
    cursor: default;
    opacity: 0;
    transform: translateX(100%);
    transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.nav-canvas.active {
    opacity: 1;
    transform: translateX(0);
} 