/* 카테고리를 가로 정렬 */
.category-menu {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    position: relative;
}

/* 카테고리 버튼 */
.category-item {
    position: relative;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.category-item > a {
    display: block;
    padding: 0.6rem 1.2rem;
    cursor: pointer;
    white-space: nowrap;
    color: white;
    font-weight: 500;
    text-decoration: none;
}

.category-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* 하위 카테고리 그룹 */
.category-group {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    background: white;
    border: none;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    z-index: 10;
    visibility: hidden;
    opacity: 0;
    padding: 1rem;
    transition: all 0.3s ease;
}

.category-group .category-item > a {
    color: #333;
}

/* #category-menu-button 또는 .category-group 에 마우스를 올렸을 때 하위 카테고리 표시 */
#category-menu-button:hover + .category-group,
.category-group:hover {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

/* 개별 하위 카테고리 */
.sub-category {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: none;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    width: 150px;
    z-index: 10;
    overflow: hidden;
}

/* 하위 카테고리 링크 */
.sub-category a {
    padding: 0.8rem 1rem;
    text-decoration: none;
    display: block;
    color: #333;
    transition: all 0.2s ease;
}

.sub-category a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
}

/* 상위 카테고리에 마우스를 올렸을 때 하위 카테고리 표시 */
.category-item:hover .sub-category {
    display: block;
}


/*---------------------------------------------------------------------------------------*/

/* 카테고리를 가로 정렬 */
.tour-category-menu {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    position: relative;
}

/* 카테고리 버튼 */
.tour-category-item {
    position: relative;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.tour-category-item > a {
    display: block;
    padding: 0.6rem 1.2rem;
    cursor: pointer;
    white-space: nowrap;
    color: white;
    font-weight: 500;
    text-decoration: none;
}

.tour-category-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* 하위 카테고리 그룹 */
.tour-category-group {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    background: white;
    border: none;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    position: absolute;
    top: calc(100% + 10px);
    left: 70%;
    z-index: 10;
    visibility: hidden;
    opacity: 0;
    padding: 1rem;
    transition: all 0.3s ease;
}

/* #category-menu-button 또는 .category-group 에 마우스를 올렸을 때 하위 카테고리 표시 */
#tour-category-menu-button:hover + .tour-category-group,
.tour-category-group:hover {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

/* 개별 하위 카테고리 */
.tour-sub-category {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: none;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    width: 150px;
    z-index: 10;
    overflow: hidden;
}

/* 하위 카테고리 링크 */
.tour-sub-category a {
    padding: 0.8rem 1rem;
    text-decoration: none;
    display: block;
    color: #333;
    transition: all 0.2s ease;
}

.tour-sub-category a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
}

/* 상위 카테고리에 마우스를 올렸을 때 하위 카테고리 표시 */
.tour-category-item:hover .tour-sub-category {
    display: block;
}

@media (min-width: 768px) {
    .category-menu .desktop-only {
        display: flex;
    }

    /*.subcategory {*/
    /*    display: none;*/
    /*    margin-top: 1rem; !* 음식 항목이 보여지면 밑으로 밀리게 여백을 줍니다 *!*/
    /*    transition: all 0.3s ease;*/
    /*}*/

}