/* =============================================================
   허브 페이지 공용 스타일 (guide.php / buy.php / cost.php 셸과 동일 클래스)
   - 신규 허브에서만 사용. 기존 3개 허브는 인라인 스타일을 유지하므로 영향 없음
   - 토큰: 히어로 #0f0c29→#302b63→#24243e / 액센트 #667eea→#764ba2
           강조 텍스트 #a78bfa→#60a5fa→#34d399 / 브레이크포인트 991·768·480
   ============================================================= */

/* ===== Base ===== */
body { opacity: 0; transition: opacity 0.5s ease; }
body.page-loaded { opacity: 1; }
html { scroll-behavior: smooth; }
.guide-container { max-width: 1200px; margin: 0 auto; padding: 0 15px; }

/* ===== Page Hero ===== */
.guide-hero {
    position: relative;
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    padding: 60px 0 50px; overflow: hidden;
}
.guide-hero::before {
    content: ''; position: absolute; top: -50%; right: -20%;
    width: 600px; height: 600px; border-radius: 50%;
    background: radial-gradient(circle, rgba(102,126,234,0.2) 0%, transparent 70%);
}
.guide-hero .guide-container { position: relative; z-index: 2; }
.guide-hero h1 { font-size: 2.2rem; font-weight: 800; color: #fff; margin-bottom: 10px; }
.guide-hero h1 .gradient-text {
    background: linear-gradient(135deg, #a78bfa, #60a5fa, #34d399);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.guide-hero .hero-sub { font-size: 1rem; color: rgba(255,255,255,0.65); margin: 0; }

/* ===== Breadcrumb ===== */
.guide-breadcrumb { background: #f8f9fa; border-bottom: 1px solid #e9ecef; padding: 12px 0; }
.guide-breadcrumb .guide-container { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.guide-breadcrumb a { color: #667eea; text-decoration: none; font-size: 0.88rem; font-weight: 500; }
.guide-breadcrumb a:hover { text-decoration: underline; }
.guide-breadcrumb .bc-sep { color: #ccc; font-size: 0.8rem; }
.guide-breadcrumb .bc-current { color: #333; font-size: 0.88rem; font-weight: 600; }

/* ===== Layout ===== */
.guide-layout { display: grid; grid-template-columns: 260px 1fr; gap: 30px; padding: 40px 0 80px; }

/* ===== Sidebar ===== */
.guide-sidebar { position: sticky; top: 90px; align-self: start; }
.sidebar-title {
    font-size: 1.1rem; font-weight: 700; color: #1a1a2e;
    margin-bottom: 16px; padding-bottom: 12px; border-bottom: 2px solid #667eea;
}
.sidebar-menu { list-style: none; padding: 0; margin: 0; }
.sidebar-menu li { margin-bottom: 2px; }
.sidebar-menu a {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 16px; border-radius: 10px;
    color: #555; font-size: 0.9rem; font-weight: 500;
    text-decoration: none; transition: all 0.2s ease;
    border: 1px solid transparent;
}
.sidebar-menu a .sub-icon {
    width: 28px; height: 28px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    background: #f0f0f5; color: #888; font-size: 0.8rem;
    transition: all 0.2s ease; flex-shrink: 0;
}
.sidebar-menu a:hover { background: #f5f3ff; color: #667eea; border-color: #e8e4f8; }
.sidebar-menu a:hover .sub-icon { background: linear-gradient(135deg, #667eea, #764ba2); color: #fff; }
.sidebar-menu a.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff; border-color: transparent;
    box-shadow: 0 4px 12px rgba(102,126,234,0.3);
}
.sidebar-menu a.active .sub-icon { background: rgba(255,255,255,0.2); color: #fff; }
/* 준비 중인 메뉴 표시 */
.sidebar-menu a.is-soon { color: #a0a0a8; }
.sidebar-menu a.is-soon .sub-icon { background: #f4f4f9; color: #b6b6c2; }
.soon-tag {
    margin-left: auto; font-size: 0.64rem; font-weight: 700; color: #8b8b9a;
    background: #eeeef4; padding: 2px 7px; border-radius: 9px;
}

/* ===== Content ===== */
.guide-content {
    background: #fff; border-radius: 16px; padding: 40px;
    border: 1px solid #f0f0f0; min-height: 400px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.guide-content-header {
    display: flex; align-items: center; gap: 14px;
    margin-bottom: 30px; padding-bottom: 20px; border-bottom: 2px solid #f0f0f5;
}
.guide-content-header .content-icon {
    width: 48px; height: 48px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff; font-size: 1.2rem; flex-shrink: 0;
}
.guide-content-header h2 { font-size: 1.5rem; font-weight: 700; color: #1a1a2e; margin: 0; }

/* ===== 본문 타이포 (fragments) ===== */
.guide-body { color: #444; line-height: 1.8; font-size: 0.95rem; }
.guide-body h3 {
    font-size: 1.15rem; font-weight: 700; color: #1a1a2e; margin: 30px 0 12px;
    padding-left: 12px; border-left: 4px solid #667eea;
}
.guide-body h3:first-child { margin-top: 0; }
.guide-body h4 { font-size: 1rem; font-weight: 700; color: #333; margin: 22px 0 10px; }
.guide-body p { margin-bottom: 14px; }
.guide-body ul, .guide-body ol { padding-left: 20px; margin-bottom: 14px; }
.guide-body li { margin-bottom: 7px; }
.guide-body strong { color: #1a1a2e; }
.guide-body a { color: #667eea; text-decoration: none; font-weight: 600; }
.guide-body a:hover { text-decoration: underline; }
.guide-body .info-box {
    background: #f0f4ff; border-left: 4px solid #667eea;
    padding: 16px 20px; border-radius: 0 10px 10px 0; margin: 18px 0;
}
.guide-body .info-box p:last-child { margin-bottom: 0; }
.guide-body .warn-box {
    background: #fff8f0; border-left: 4px solid #f59e0b;
    padding: 16px 20px; border-radius: 0 10px 10px 0; margin: 18px 0;
}
.guide-body .warn-box p:last-child { margin-bottom: 0; }
.guide-body table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.guide-body th, .guide-body td {
    padding: 11px 14px; border: 1px solid #e5e7eb; text-align: left; font-size: 0.9rem;
}
.guide-body th { background: #f8f9fa; font-weight: 700; color: #333; }
.guide-body td.num, .guide-body th.num { text-align: center; }
.guide-body img { max-width: 100%; height: auto; border-radius: 10px; margin: 12px 0; }

/* ===== 슬로건 / 강조 박스 ===== */
.mk-slogan {
    display: flex; align-items: center; gap: 14px;
    margin: 0 0 18px; padding: 20px 22px; border-radius: 14px;
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 55%, #24243e 100%);
    color: #fff;
}
.mk-slogan i { font-size: 1.3rem; color: #a78bfa; flex-shrink: 0; }
.mk-slogan span { font-size: 1.1rem; font-weight: 800; line-height: 1.5; }
.mk-slogan em {
    font-style: normal;
    background: linear-gradient(135deg, #a78bfa, #60a5fa, #34d399);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

/* 서비스 4단 카드 */
.mk-service-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 18px 0 6px; }
.mk-service {
    padding: 16px 14px; border-radius: 12px; text-align: center;
    background: #f8f9fa; border: 1px solid #f0f0f0; transition: all 0.28s ease;
}
.mk-service:hover { transform: translateY(-4px); background: #fff; border-color: #667eea; box-shadow: 0 10px 22px rgba(102,126,234,0.14); }
.mk-service .ms-ico {
    width: 40px; height: 40px; border-radius: 12px; margin: 0 auto 10px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #667eea, #764ba2); color: #fff; font-size: 0.95rem;
}
.mk-service .ms-name { font-size: 0.88rem; font-weight: 700; color: #1a1a2e; }
.mk-service .ms-sub { font-size: 0.74rem; color: #9a9aa6; margin-top: 3px; }

/* CTA */
.mk-cta {
    display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    margin-top: 30px; padding: 22px 24px; border-radius: 14px;
    background: linear-gradient(135deg, #f5f3ff 0%, #eef2ff 100%);
    border: 1px solid #e8e4f8;
}
.mk-cta p { margin: 0; font-size: 0.92rem; color: #444; }
.mk-cta p strong { color: #1a1a2e; }
.mk-cta-btn {
    display: inline-flex; align-items: center; gap: 9px; flex-shrink: 0;
    padding: 12px 26px; border-radius: 24px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff; font-size: 0.88rem; font-weight: 700; text-decoration: none;
    box-shadow: 0 6px 16px rgba(102,126,234,0.32); transition: all 0.25s ease;
}
.mk-cta-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(102,126,234,0.42); color: #fff; }

/* ===== 애니메이션 ===== */
.fade-up { opacity: 0; transform: translateY(20px); transition: all 0.5s ease; }
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* ===== Responsive ===== */
@media (max-width: 991px) {
    .guide-hero h1 { font-size: 1.8rem; }
    .guide-layout { grid-template-columns: 220px 1fr; gap: 20px; }
    .mk-service-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .guide-hero { padding: 40px 0 30px; }
    .guide-hero h1 { font-size: 1.5rem; }
    .guide-layout { grid-template-columns: 1fr; gap: 0; padding: 20px 0 50px; }
    .guide-sidebar { position: static; margin-bottom: 20px; }
    .sidebar-menu { display: flex; flex-wrap: wrap; gap: 6px; }
    .sidebar-menu li { margin-bottom: 0; }
    .sidebar-menu a { padding: 8px 12px; font-size: 0.82rem; }
    .sidebar-menu a .sub-icon { display: none; }
    .soon-tag { display: none; }
    .guide-content { padding: 24px 18px; }
    .guide-content-header h2 { font-size: 1.2rem; }
    .mk-slogan { padding: 16px; gap: 10px; }
    .mk-slogan span { font-size: 0.98rem; }
    .mk-cta { flex-direction: column; align-items: stretch; }
    .mk-cta-btn { justify-content: center; }
    /* 표 카드형 변환 */
    .guide-body table { display: block; overflow-x: auto; white-space: nowrap; }
    .guide-body th, .guide-body td { padding: 9px 11px; font-size: 0.84rem; }
}
@media (max-width: 480px) {
    .mk-service-grid { grid-template-columns: 1fr; }
}
