/* ====================================================
   직업별 공략 분석 페이지
   ==================================================== */

.ja-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 28px 20px 80px;
}

/* ===== 직업 헤더 ===== */
.ja-job-head {
    display: grid;
    grid-template-columns: 210px 1fr;
    gap: 24px;
    background: linear-gradient(135deg, #3C3744 0%, #4a4452 100%);
    color: #fff;
    padding: 24px 28px;
    border-radius: 16px;
    margin-bottom: 22px;
    box-shadow: 0 6px 18px rgba(60,55,68,0.18);
}
.ja-job-illust-wrap {
    width: 210px;
    height: 180px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ja-job-illust {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transform: translateX(10px); /*일러스터 이미지 이동*/
}
.ja-job-illust-fallback {
    color: rgba(255,255,255,0.4);
    font-size: 36px;
    font-weight: 800;
    width: 100%; height: 100%;
    align-items: center;
    justify-content: center;
}
.ja-job-meta {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
}
.ja-job-group {
    font-size: 12px;
    font-weight: 700;
    color: #B4C5E4;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.ja-job-name {
    font-size: 32px;
    font-weight: 800;
    margin: 0;
}
.ja-job-sample {
    font-size: 14px;
    color: rgba(255,255,255,0.85);
}
.ja-job-sample strong {
    color: #ffd95a;
    font-weight: 800;
}
.ja-job-links {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
}
.ja-job-link {
    display: inline-flex;
    align-items: center;
    background: #B4C5E4;
    color: #3C3744;
    padding: 8px 16px;
    border-radius: 18px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.15s, transform 0.15s;
}
.ja-job-link:hover {
    background: #fff;
    transform: translateY(-1px);
}
.ja-job-link.ghost {
    background: transparent;
    color: #fff;
    border: 1.5px solid rgba(255,255,255,0.35);
}
.ja-job-link.ghost:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

/* ===== 본문 레이아웃 (사이드 + 본문) ===== */
.ja-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 22px;
    align-items: flex-start;
}

/* ===== 좌측 직업 선택 ===== */
.ja-side {
    background: #fff;
    border: 1px solid #e6e8ef;
    border-radius: 14px;
    padding: 14px 12px;
    position: sticky;
    top: 16px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
}
.ja-side-title {
    font-size: 13px;
    font-weight: 700;
    color: #3C3744;
    margin-bottom: 10px;
    padding: 0 6px 8px;
    border-bottom: 1px solid #eef0f6;
}
.ja-side-search-wrap {
    position: relative;
    margin: 0 4px 12px;
}
.ja-side-search {
    width: 100%;
    padding: 7px 28px 7px 12px;
    border: 1.5px solid #d9deea;
    border-radius: 18px;
    background: #fff;
    font-size: 12.5px;
    color: #3C3744;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.ja-side-search:focus {
    border-color: #3C3744;
    box-shadow: 0 0 0 2px rgba(60,55,68,0.08);
}
.ja-side-search-clear {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #aaa;
    font-size: 12px;
    cursor: pointer;
    padding: 4px 6px;
    line-height: 1;
    display: none;
}
.ja-side-search-wrap.has-value .ja-side-search-clear { display: block; }
.ja-side-search-clear:hover { color: #3C3744; }
.ja-side-empty {
    text-align: center;
    padding: 16px 6px;
    color: #aaa;
    font-size: 12px;
}
.ja-side-group {
    margin-bottom: 12px;
}
.ja-side-group-name {
    font-size: 11px;
    font-weight: 800;
    color: #9aa1b1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 8px;
}
.ja-side-jobs {
    display: flex;
    flex-direction: column;
}
.ja-side-job {
    display: block;
    padding: 6px 10px;
    margin: 2px 0;
    border-radius: 8px;
    font-size: 13px;
    color: #3C3744;
    text-decoration: none;
    transition: background 0.15s;
}
.ja-side-job:hover {
    background: #f1f3f9;
}
.ja-side-job.active {
    background: #3C3744;
    color: #fff;
    font-weight: 700;
}

.ja-mobile-select-wrap {
    display: none;
    margin-bottom: 12px;
}
.ja-mobile-select {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #d9deea;
    border-radius: 12px;
    background: #fff;
    font-size: 14px;
    font-weight: 700;
    color: #3C3744;
}

/* ===== 본문 ===== */
.ja-main {
    min-width: 0;
}

/* 탭 */
.ja-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 18px;
    border-bottom: 2px solid #e6e8ef;
}
.ja-tab {
    background: none;
    border: none;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 700;
    color: #888;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: color 0.15s, border-color 0.15s;
}
.ja-tab:hover { color: #3C3744; }
.ja-tab.active {
    color: #3C3744;
    border-bottom-color: #3C3744;
}

/* 탭 패널 */
.ja-tab-panel { display: none; }
.ja-tab-panel.active { display: block; }

/* 섹션 그리드 */
.ja-section-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}
.ja-section-grid.two-col {
    grid-template-columns: 1fr 1fr;
}

/* 섹션 */
.ja-section {
    background: #fff;
    border: 1px solid #e6e8ef;
    border-radius: 12px;
    padding: 16px 18px;
}
.ja-section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px dashed #eef0f6;
}
.ja-section-title {
    font-size: 15px;
    font-weight: 800;
    color: #3C3744;
    margin: 0;
}
.ja-section-denom {
    font-size: 11px;
    color: #aaa;
    font-weight: 600;
}

/* 어빌리티 등급별 색상 (큐브 페이지와 동일) */
.ja-section.grade-legendary {
    border-color: #27ae60;
    background: linear-gradient(180deg, rgba(39,174,96,0.06) 0%, #fff 60%);
}
.ja-section.grade-legendary .ja-section-head {
    border-bottom-color: rgba(39,174,96,0.35);
}
.ja-section.grade-legendary .ja-section-title { color: #27ae60; }
.ja-section.grade-legendary .ja-row-bar {
    background: linear-gradient(90deg, #6fdc94 0%, #27ae60 100%);
}
.ja-section.grade-legendary .ja-section-title::before {
    content: '레전드리';
    display: inline-block;
    background: #27ae60;
    color: #fff;
    font-size: 10.5px;
    padding: 2px 7px;
    border-radius: 8px;
    margin-right: 6px;
    vertical-align: 1px;
    letter-spacing: 0.2px;
}

.ja-section.grade-unique {
    border-color: #f1c40f;
    background: linear-gradient(180deg, rgba(241,196,15,0.07) 0%, #fff 60%);
}
.ja-section.grade-unique .ja-section-head {
    border-bottom-color: rgba(241,196,15,0.4);
}
.ja-section.grade-unique .ja-section-title { color: #c9a008; }
.ja-section.grade-unique .ja-row-bar {
    background: linear-gradient(90deg, #ffe07a 0%, #f1c40f 100%);
}
.ja-section.grade-unique .ja-section-title::before {
    content: '유니크';
    display: inline-block;
    background: #f1c40f;
    color: #3C3744;
    font-size: 10.5px;
    padding: 2px 7px;
    border-radius: 8px;
    margin-right: 6px;
    vertical-align: 1px;
    letter-spacing: 0.2px;
    font-weight: 800;
}

/* 행 */
.ja-rows {
    list-style: none;
    margin: 0;
    padding: 0;
}
.ja-row {
    display: grid;
    grid-template-columns: 24px 28px 180px 1fr 56px;
    gap: 10px;
    align-items: center;
    padding: 5px 8px;
    border-radius: 6px;
    font-size: 13px;
    color: #3C3744;
    transition: background 0.12s;
}
.ja-row.no-icon {
    grid-template-columns: 24px 180px 1fr 56px;
}
.ja-row:hover {
    background: #f1f3f9;
}
.ja-row + .ja-row {
    border-top: 1px solid #f5f7fb;
}
.ja-row-rank {
    color: #aab1c3;
    font-weight: 700;
    font-size: 12px;
    text-align: right;
}
.ja-row-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: #f1f3f9;
    border: 1px solid #e6e8ef;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ja-row-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.ja-row-icon-fallback {
    font-size: 11px;
    font-weight: 700;
    color: #aab1c3;
}
/* 멀티 아이콘 (강화 코어 등 슬래시 합성 스킬) */
.ja-row-icons {
    display: flex;
    align-items: center;
    gap: 4px;
}
.ja-row-icons .ja-row-icon {
    flex: 0 0 auto;
}
.ja-section.multi-icon .ja-row {
    grid-template-columns: 24px 92px 180px 1fr 56px;
}
.ja-row-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ja-row-bar-wrap {
    background: #f1f3f9;
    border-radius: 6px;
    height: 8px;
    overflow: hidden;
    position: relative;
}
.ja-row-bar {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #B4C5E4 0%, #3C3744 100%);
    border-radius: 6px;
    transition: width 0.3s ease;
}
.ja-row-pct {
    text-align: right;
    font-weight: 700;
    font-size: 12.5px;
    color: #3C3744;
}
.ja-row.minor .ja-row-name,
.ja-row.minor .ja-row-pct { color: #888; }

.ja-minor {
    margin-top: 10px;
    border-top: 1px dashed #eef0f6;
    padding-top: 8px;
}
.ja-minor summary {
    font-size: 12px;
    color: #888;
    cursor: pointer;
    padding: 4px 0;
}
.ja-minor summary:hover { color: #3C3744; }

/* ===== 반응형 ===== */
@media (max-width: 1080px) {
    .ja-section-grid.two-col { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .ja-container { padding: 18px 12px 60px; }
    .ja-job-head {
        grid-template-columns: 130px 1fr;
        gap: 16px;
        padding: 18px;
    }
    .ja-job-illust-wrap { width: 130px; height: 110px; }
    .ja-job-name { font-size: 22px; }
    .ja-layout { grid-template-columns: 1fr; gap: 14px; }
    .ja-side { display: none; }
    .ja-mobile-select-wrap { display: block; }
    .ja-tab { padding: 8px 12px; font-size: 13px; }
    .ja-section { padding: 14px; }
    .ja-row {
        grid-template-columns: 22px 24px 140px 1fr 48px;
        font-size: 12px;
        gap: 8px;
        padding: 5px 6px;
    }
    .ja-row.no-icon {
        grid-template-columns: 22px 140px 1fr 48px;
    }
    .ja-section.multi-icon .ja-row {
        grid-template-columns: 22px 80px 140px 1fr 48px;
    }
    .ja-row-icon { width: 24px; height: 24px; border-radius: 5px; }
    .ja-row-icons { gap: 4px; }
    .ja-row-bar-wrap { height: 6px; }
}
@media (max-width: 480px) {
    .ja-row {
        grid-template-columns: 20px 22px 1fr 44px;
        gap: 6px;
        padding: 5px 4px;
    }
    .ja-row.no-icon {
        grid-template-columns: 20px 1fr 44px;
    }
    .ja-section.multi-icon .ja-row {
        grid-template-columns: 20px 72px 1fr 44px;
    }
    .ja-row-icon { width: 22px; height: 22px; }
    .ja-row-icons { gap: 3px; }
    .ja-row-bar-wrap { display: none; }
}

/* ===== 스킬 설명 툴팁 ===== */
.ja-tooltip {
    position: fixed;
    z-index: 10000;
    max-width: 360px;
    background: #2a2630;
    color: #f5f5f5;
    border: 1px solid #4a4452;
    border-radius: 10px;
    padding: 12px 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    font-size: 12.5px;
    line-height: 1.6;
    pointer-events: none;
    word-break: keep-all;
    overflow-wrap: break-word;
}
.ja-tooltip-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #B4C5E4;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #4a4452;
}
.ja-tooltip-body {
    white-space: pre-line;
    color: #e8e8e8;
}
.ja-row[data-desc]:not([data-desc=""]) { cursor: help; }

@media (max-width: 480px) {
    .ja-tooltip {
        max-width: calc(100vw - 24px);
        font-size: 12px;
        padding: 10px 12px;
    }
    .ja-tooltip-title { font-size: 13px; }
}
