/* WPBakery Page Builder 전용 스타일 */

/* WPBakery 래퍼 스타일 */
.site-guide-wpbakery-wrapper,
.site-guide-tree-wpbakery-wrapper,
.single-guide-wpbakery-wrapper,
.guide-search-wpbakery-wrapper {
    margin: 20px 0;
    clear: both;
}

/* Visual Composer 편집 모드에서의 스타일 */
.vc_element-container .site-guide-container,
.vc_element-container .site-guide-tree-container {
    min-height: 50px;
    padding: 15px;
    border: 2px dashed #ddd;
    background-color: #f9f9f9;
    position: relative;
}

.vc_element-container .site-guide-container:before,
.vc_element-container .site-guide-tree-container:before {
    content: "사이트 설명서";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #999;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.vc_element-container .site-guide-tree-container:before {
    content: "사이트 설명서 (계층구조)";
}

/* 빈 콘텐츠 플레이스홀더 */
.site-guide-wpbakery-wrapper:empty:before {
    content: "설명서를 불러오는 중...";
    display: block;
    padding: 20px;
    text-align: center;
    color: #999;
    font-style: italic;
    background: #f5f5f5;
    border: 1px dashed #ccc;
    border-radius: 4px;
}

/* WPBakery 그리드 시스템과의 호환성 */
.vc_row .site-guide-wpbakery-wrapper {
    width: 100%;
    box-sizing: border-box;
}

.vc_col-sm-12 .site-guide-list.grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.vc_col-sm-6 .site-guide-list.grid {
    grid-template-columns: 1fr;
}

.vc_col-sm-4 .site-guide-list.grid {
    grid-template-columns: 1fr;
}

.vc_col-sm-3 .site-guide-list.grid {
    grid-template-columns: 1fr;
}

/* 단일 가이드 WPBakery 스타일 */
.single-guide-wpbakery-wrapper .guide-item {
    margin: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}

.single-guide-wpbakery-wrapper .guide-title {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #0073aa;
}

.single-guide-wpbakery-wrapper .guide-content {
    line-height: 1.6;
}

/* 검색 WPBakery 스타일 */
.guide-search-wpbakery-wrapper .site-guide-search {
    position: relative;
    max-width: 500px;
}

.guide-search-wpbakery-wrapper input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 25px;
    font-size: 16px;
    transition: all 0.3s ease;
    outline: none;
}

.guide-search-wpbakery-wrapper input[type="text"]:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.guide-search-wpbakery-wrapper .search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    margin-top: 5px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* WPBakery 섹션 배경과의 조화 */
.vc_section[data-vc-full-width] .site-guide-wpbakery-wrapper {
    padding: 0 15px;
}

.vc_section .site-guide-wpbakery-wrapper .guide-item {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

/* 반응형 WPBakery 지원 */
@media (max-width: 768px) {
    .vc_col-sm-12 .site-guide-list,
    .vc_col-sm-6 .site-guide-list,
    .vc_col-sm-4 .site-guide-list,
    .vc_col-sm-3 .site-guide-list {
        grid-template-columns: 1fr;
    }
    
    .guide-search-wpbakery-wrapper {
        margin: 15px 0;
    }
    
    .single-guide-wpbakery-wrapper .guide-title {
        font-size: 18px;
    }
}

/* WPBakery 파라매터 미리보기 */
.vc_element[data-model-id] .site-guide-wpbakery-wrapper {
    opacity: 0.8;
    pointer-events: none;
}

.vc_element.vc_element-hover .site-guide-wpbakery-wrapper {
    opacity: 1;
}

/* 편집 모드 오버레이 */
.vc_element .site-guide-wpbakery-wrapper:after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 115, 170, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.vc_element:hover .site-guide-wpbakery-wrapper:after {
    opacity: 1;
}

/* WPBakery 아이콘 스타일 개선 */
.vc_general.vc_element .site-guide-wpbakery-wrapper {
    position: relative;
}

/* 데이터가 없을 때 메시지 */
.site-guide-wpbakery-wrapper .no-guides-message {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    color: #6c757d;
    font-style: italic;
}

.site-guide-wpbakery-wrapper .no-guides-message:before {
    content: "📚";
    display: block;
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* 로딩 상태 */
.site-guide-wpbakery-wrapper.loading {
    position: relative;
    min-height: 100px;
}

.site-guide-wpbakery-wrapper.loading:before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 32px;
    height: 32px;
    margin: -16px 0 0 -16px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 고급 그라데이션 배경 */
.vc_section[data-vc-parallax] .site-guide-wpbakery-wrapper .guide-item {
    background: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.8) 100%);
    border: 1px solid rgba(255,255,255,0.3);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

/* 커스텀 애니메이션 */
.site-guide-wpbakery-wrapper .guide-item {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.site-guide-wpbakery-wrapper .guide-item:nth-child(2) { animation-delay: 0.1s; }
.site-guide-wpbakery-wrapper .guide-item:nth-child(3) { animation-delay: 0.2s; }
.site-guide-wpbakery-wrapper .guide-item:nth-child(4) { animation-delay: 0.3s; }
.site-guide-wpbakery-wrapper .guide-item:nth-child(5) { animation-delay: 0.4s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 40px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

/* 다크 테마 지원 */
.vc_section.dark-theme .site-guide-wpbakery-wrapper .guide-item,
.vc_row.dark-bg .site-guide-wpbakery-wrapper .guide-item {
    background: rgba(45, 55, 72, 0.9);
    color: #e2e8f0;
    border-color: #4a5568;
}

.vc_section.dark-theme .guide-title,
.vc_row.dark-bg .guide-title {
    color: #f7fafc;
}

.vc_section.dark-theme .guide-content,
.vc_row.dark-bg .guide-content {
    color: #cbd5e0;
}
