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

/* ============================================
   基本スタイル
   ============================================ */
.apexpp-navbar {
    position: relative;
    width: 100%;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.apexpp-navbar-wrapper {
    width: 100%;
    margin: 0 auto;
    padding: 0 15px;
}

.apexpp-navbar-wrapper.container {
    max-width: 1200px;
}

.apexpp-navbar-wrapper.container-fluid {
    max-width: 100%;
}

.apexpp-navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 60px;
}

/* ============================================
   ロゴ
   ============================================ */
.apexpp-navbar-brand {
    flex-shrink: 0;
}

.apexpp-navbar-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.apexpp-navbar-logo-img {
    max-height: 40px;
    width: auto;
    display: block;
}

.apexpp-navbar-logo-text {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
}

/* ============================================
   ハンバーガーメニューボタン（スマホ用）
   ============================================ */
.apexpp-navbar-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.apexpp-navbar-toggle-icon {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    height: 100%;
}

.apexpp-navbar-toggle-icon span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #333;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.apexpp-navbar-toggle[aria-expanded="true"] .apexpp-navbar-toggle-icon span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.apexpp-navbar-toggle[aria-expanded="true"] .apexpp-navbar-toggle-icon span:nth-child(2) {
    opacity: 0;
}

.apexpp-navbar-toggle[aria-expanded="true"] .apexpp-navbar-toggle-icon span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

/* ============================================
   メニュー
   ============================================ */
.apexpp-navbar-menu {
    display: flex;
    align-items: center;
}

.apexpp-navbar-menu-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
}

.apexpp-navbar-menu-item {
    position: relative;
}

.apexpp-navbar-menu-link {
    display: block;
    padding: 15px 20px;
    text-decoration: none;
    color: #333;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.apexpp-navbar-menu-link:hover {
    color: #007bff;
}

/* ============================================
   サブメニュー（デスクトップ）
   ============================================ */
.apexpp-navbar-submenu-toggle {
    display: none;
}

.apexpp-navbar-submenu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background-color: #fff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    list-style: none;
    margin: 0;
    padding: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    z-index: 1000;
}

.apexpp-navbar-menu-item-has-children:hover .apexpp-navbar-submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.apexpp-navbar-submenu-item {
    border-bottom: 1px solid #eee;
}

.apexpp-navbar-submenu-item:last-child {
    border-bottom: none;
}

.apexpp-navbar-submenu-link {
    display: block;
    padding: 12px 20px;
    text-decoration: none;
    color: #333;
    font-size: 0.9rem;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.apexpp-navbar-submenu-link:hover {
    background-color: #f8f9fa;
    color: #007bff;
}

/* ============================================
   スマホ用スタイル
   ============================================ */
@media (max-width: 767px) {
    .apexpp-navbar-toggle {
        display: flex;
    }

    .apexpp-navbar-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background-color: #fff;
        box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
        flex-direction: column;
        align-items: flex-start;
        padding: 60px 0 20px;
        transition: right 0.3s ease;
        overflow-y: auto;
        z-index: 1000;
    }

    .apexpp-navbar-menu.is-open {
        right: 0;
    }

    .apexpp-navbar-close {
        position: absolute;
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 1001;
    }

    .apexpp-navbar-close-icon {
        font-size: 2rem;
        color: #333;
        line-height: 1;
    }

    .apexpp-navbar-menu-list {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }

    .apexpp-navbar-menu-item {
        width: 100%;
        border-bottom: 1px solid #eee;
    }

    .apexpp-navbar-menu-link {
        padding: 15px 20px;
        width: 100%;
    }

    /* スマホ用サブメニュー */
    .apexpp-navbar-submenu-toggle {
        display: flex;
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        width: 30px;
        height: 30px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        align-items: center;
        justify-content: center;
    }

    .apexpp-navbar-submenu-toggle-icon {
        font-size: 0.8rem;
        color: #333;
        transition: transform 0.3s ease;
    }

    .apexpp-navbar-submenu-toggle[aria-expanded="true"] .apexpp-navbar-submenu-toggle-icon {
        transform: rotate(180deg);
    }

    .apexpp-navbar-submenu {
        position: static;
        width: 100%;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        background-color: #f8f9fa;
    }

    .apexpp-navbar-submenu.is-open {
        max-height: 500px;
    }

    .apexpp-navbar-submenu-item {
        border-bottom: 1px solid #ddd;
    }

    .apexpp-navbar-submenu-link {
        padding: 12px 20px 12px 40px;
    }
}

/* ============================================
   オーバーレイ（スマホ用）
   ============================================ */
.apexpp-navbar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.apexpp-navbar-overlay.is-active {
    display: block;
    opacity: 1;
}

@media (min-width: 768px) {
    .apexpp-navbar-overlay {
        display: none !important;
    }
}

