/* テンポス法人ドットコム - カード型デザイン + ポップアップ機能 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    background-color: #f5f7fa;
    color: #333;
}

.container {
    display: flex;
    min-height: 100vh;
}

/* レフトナビゲーション */
.left-nav {
    width: 380px;
    background-color: transparent;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
}

/* カード */
.nav-card {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    overflow: visible; /* ポップアップのためにvisibleに変更 */
    position: relative;
}

/* 最初のカード（業務用冷機器）のみに青いボーダー */
.nav-card:first-child {
    border-left: 5px solid #2196F3;
}

/* ナビアイテム */
.nav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background-color: #ffffff;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #e8eaed;
    text-decoration: none;
    color: inherit;
    position: relative;
    pointer-events: auto; /* リンク自体はクリック可能 */
}

/* 最後のアイテムはボーダーなし */
.nav-card .nav-item:last-child {
    border-bottom: none;
}

/* ホバー効果 */
.nav-item:hover {
    background-color: #f8f9fa;
}

/* メインアイテム（業務用冷機器） */
.main-item {
    background-color: #e3f2fd !important;
}

.main-item:hover {
    background-color: #d1e7fc !important;
}

/* アイテムコンテンツ */
.item-content {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* アイコン */
.icon {
    font-size: 24px;
    color: #2196F3;
    width: 28px;
    text-align: center;
    flex-shrink: 0;
}

/* テキスト */
.item-text {
    font-size: 15px;
    font-weight: 400;
    color: #1a1a1a;
    letter-spacing: 0.2px;
}

/* 矢印アイコン */
.arrow {
    font-size: 16px;
    color: #2196F3;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.nav-item:hover .arrow {
    transform: translateX(3px);
}

/* 単独カード用スタイル */
.nav-card.single {
    border-left: none;
}

/* ===== ポップアップメニュー ===== */
.popup-menu {
    display: none;
    position: absolute;
    left: calc(100% + 10px);
    top: -16px;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 12px;
    min-width: 500px;
    max-width: 600px;
    z-index: 1000;
}

/* カードにホバーした時にポップアップを表示 */
.nav-card:hover .popup-menu {
    display: block;
}

/* ポップアップ表示中は.nav-itemのボーダーを非表示 */
.nav-card:hover .nav-item {
    border-bottom: none;
}

/* ポップアップ内のリンクをクリック可能にする */
.popup-menu,
.popup-menu * {
    pointer-events: auto !important;
}

/* ポップアップのタイトル */
.popup-title {
    font-size: 14px;
    font-weight: 600;
    color: #2196F3;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e3f2fd;
}

/* ポップアップのグリッドレイアウト（2列） */
.popup-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px 16px !important;
    width: 100%;
}

/* ポップアップアイテム */
.popup-item {
    display: flex !important;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.popup-item:hover {
    background-color: #f5f5f5;
}

/* ポップアップアイテムのアイコン */
.popup-item .fa-circle {
    font-size: 6px;
    color: #2196F3;
}

/* ポップアップアイテムの矢印 */
.popup-item .fa-chevron-right {
    font-size: 12px;
    color: #999;
    margin-left: auto;
}

.popup-item:hover .fa-chevron-right {
    color: #2196F3;
}

/* コンテンツエリア */
.content {
    flex: 1;
    padding: 40px;
    background-color: #ffffff;
}

.content h1 {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 16px;
}

.content p {
    font-size: 15px;
    color: #666;
    line-height: 1.6;
}

/* アクティブ状態 */
.nav-item.active {
    background-color: #bbdefb !important;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .left-nav {
        width: 100%;
        padding: 12px;
        gap: 12px;
    }

    .nav-item {
        padding: 14px 16px;
    }

    .item-text {
        font-size: 14px;
    }

    .icon {
        font-size: 22px;
        width: 26px;
    }

    .arrow {
        font-size: 14px;
    }

    .content {
        padding: 24px 16px;
    }

    .content h1 {
        font-size: 22px;
    }

    /* モバイルではポップアップを無効化 */
    .popup-menu {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .left-nav {
        width: 100%;
        padding: 8px;
    }

    .nav-item {
        padding: 12px 14px;
    }

    .item-text {
        font-size: 13px;
    }

    .icon {
        font-size: 20px;
        width: 24px;
    }
}
