.main-categories {
    margin-top: 40px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.category-link {
    display: inline-block;
    padding: 15px 30px;
    background: #f4f4f4;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    font-size: 16px;
    min-width: 200px;
    text-align: center;
    transition: background 0.3s, color 0.3s;
}

.category-link:hover {
    background: #007bff;
    color: #fff;
}

.main-footer-text {
    margin-top: 50px;
    font-size: 14px;
    color: #777;
    text-align: center;
}
.main-footer-text a {
    color: #007bff;
    text-decoration: none;
}
.main-footer-text a:hover {
    text-decoration: underline;
}


.userguide-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: #f9f9f9;
    padding: 20px;
    box-sizing: border-box;
    border-right: 1px solid #ddd;
}
.service-logo {
    width: 180px !important;
    height: auto;
    margin: 10px 0;
    display: block;
}
.tree-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tree-parent {
    font-weight: bold;
    padding: 10px;
    cursor: pointer;
    background: #f0f0f0;
    border-radius: 6px;
    margin-bottom: 5px;
}

.tree-child {
    padding-left: 15px;
    display: none; /* 기본은 닫힌 상태 */
}

/* 현재 선택된 메뉴 링크 */
.tree-child a.active {
    font-weight: bold;
    color: #007bff;
}

/* 열린 카테고리 강조 */
.tree-parent.active {
    font-weight: bold;
    color: #007bff;
}

.tree-child li {
    padding: 5px 0;
}

.tree-child li a {
    display: block; /* ✅ a태그 전체 영역 클릭 가능하게 */
    padding: 6px 0 6px 12px; /* ✅ 위아래 여백 6px, 왼쪽 들여쓰기 16px */
    text-decoration: none;
    color: #333;
    font-size: 14px;
}

.tree-child li a:hover {
    text-decoration: underline;
}
.tree-child,
.tree-subchild {
    display: none;
    padding-left: 15px;
}

.tree-parent.active + .tree-child,
.tree-subparent.active + .tree-subchild {
    display: block;
}

.tree-parent, .tree-subparent {
    cursor: pointer;
    font-weight: bold;
    margin-top: 6px;
}

.content {
    flex: 1;
    padding: 30px;
}

/* .content {
    position: relative;
    z-index: 1;
    background: #ffffff;
    padding: 40px 20px;
    overflow: hidden;
} */

/* 🔹 메인에만 배경 일러스트 추가 */
/* .content::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: url('/userguide/images/background_illustration.png') no-repeat center top;
    background-size: contain;
    opacity: 0.08; 
    pointer-events: none; 
    z-index: 0;
} */

/* 전체 레이아웃 */
body {
    margin: 0;
    font-family: 'Noto Sans KR', sans-serif;
}

/* 헤더 */
.userguide-header {
    background-color: #007bff;
    color: #ffffff;
    padding: 15px 20px;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 20px;
    font-weight: bold;
}

.back-to-main a {
    color: #ffffff;
    text-decoration: underline;
    font-size: 14px;
}

/* 본문 레이아웃 */
.userguide-layout {
    display: flex;
    min-height: calc(100vh - 120px); /* 헤더+푸터 제외 높이 */
}
/* 본문 레이아웃 */
.simple-userguide-layout {
    display: flex;
    min-height: calc(100vh); /* 헤더+푸터 제외 높이 */
}
.guide-section {
    margin-top: 30px;
}

.guide-row {
    display: flex;
    align-items: flex-start; /* ✅ 상단 정렬 */
    margin-bottom: 30px;
    gap: 20px;
}

.guide-image {
    flex: 0 0 350px;
    padding-right: 10px;
}

.guide-image img {
    width: 100%;
    border-radius: 8px;
    /* box-shadow: 0 2px 8px rgba(0,0,0,0.1); */
    border: 1px solid #ccc; /* ✅ 부드러운 회색 테두리 */
    cursor: pointer;         /* ✅ 클릭 가능한 느낌 추가 */
}

.image-modal {
    display: none;
    position: fixed;
    z-index: 999;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.8);
}

.image-modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80%;
    border-radius: 8px;
    border: 2px solid white;
}

.image-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}
.guide-text {
    flex: 1;
}

.guide-text h2 {
    font-size: 20px;
    margin-top: 0;
    margin-bottom: 8px; /* ✅ 아래쪽은 적당히 여백 주기 */
}

.guide-text p {
    font-size: 16px;
    line-height: 1.6;
}
.page-nav {
    display: flex;
    justify-content: space-between;
    margin-bottom: 24px;
    padding: 12px 0;
    border-bottom: 1px solid #ddd;
    font-size: 14px;
}

.page-nav a {
    color: #007bff;
    text-decoration: none;
}

.page-nav a:hover {
    text-decoration: underline;
}

.page-nav .prev-page {
    text-align: left;
}

.page-nav .next-page {
    text-align: right;
    margin-left: auto;
}

.icon-img {
    width: 24px;
    height: 24px;
}
.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    color: #333;
    cursor: pointer;
    text-decoration: none;
}

.icon-button:hover {
    color: #007bff;
}

/* 푸터 */
.userguide-footer {
    background-color: #f1f1f1;
    text-align: center;
    font-size: 13px;
    color: #666;
    padding: 10px 0;
}
.menu-toggle {
    display: none; /* 기본은 숨김 (PC용) */
}
#scrollTopBtn {
    position: fixed;
    bottom: 30px;
    right: 20px;
    z-index: 999;
    background: #2c7be5;
    color: white;
    border: none;
    padding: 12px 15px;
    font-size: 18px;
    border-radius: 50%;
    cursor: pointer;
    display: none; /* 기본은 숨김 */
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

#scrollTopBtn:hover {
    background: #1a5dc9;
}

.guide-video {
    margin-top: 40px;
    padding: 20px 0;
    border-top: 1px solid #ddd;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 비율 */
    height: 0;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* 🔥 반응형 모바일 대응 */
@media (max-width: 1024px) {
    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        cursor: pointer;
    }
    .main-categories {
        flex-direction: column;
        align-items: center;
    }

    .category-link {
        width: 90%; /* ✅ 화면 거의 꽉 채우기 */
        max-width: 400px;
        font-size: 16px;
    }

    .main-hero h1 {
        font-size: 28px; /* ✅ 모바일에서는 제목 살짝 줄이기 */
    }

    .main-hero p {
        font-size: 16px;
    }

    /* .sidebar {
        display: none;
    } */

    .sidebar {
        position: fixed;
        top: 0px; /* 헤더 높이만큼 아래로 */
        left: 0;
        width: 260px;
        height: calc(100%);
        background: #fff;
        box-shadow: 2px 0 8px rgba(0,0,0,0.1);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1000;
        overflow-y: auto;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .userguide-layout {
        grid-template-columns: 1fr; /* 콘텐츠만 1열 */
    }
    .guide-row {
        flex-direction: column;
        align-items: center; /* 가운데 정렬 */
        text-align: center; /* 텍스트도 가운데 */
    }

    .guide-image {
        flex: none; /* ✅ flex 해제 */
        width: 90%;
        max-width: 400px;
        height: auto !important;
        padding-right: 0;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .guide-text {
        width: auto;
        max-width: 90%;
    }

    .guide-image img {
        width: 100%;
        height: auto;
    }

    .guide-text h2 {
        margin-top: 20px; /* 이미지와 텍스트 사이 여백 */
    }
}

@media (max-width: 600px) {
    .icon-img {
        width: 20px;
        height: 20px;
    }
    .category-link {
        font-size: 14px; /* ✅ 작은 스마트폰에서는 글자도 더 작게 */
        padding: 12px 20px;
    }
}