/**
 * ヒューマノイドジョブ - 記事ページ専用CSS
 */

/* パンくずリスト */
.article-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 16px 0;
    font-size: 13px;
    color: var(--text-muted);
    flex-wrap: wrap;
}
.article-breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition);
}
.article-breadcrumb a:hover { color: var(--accent); }
.article-breadcrumb .bc-sep { width: 14px; height: 14px; flex-shrink: 0; }
.article-breadcrumb [aria-current] { color: var(--text-muted); font-weight: 500; }

/* レイアウト */
.article-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 40px;
    padding-bottom: 60px;
}
.article-main { min-width: 0; }

/* ヘッダー */
.article-header { margin-bottom: 32px; }
.article-cat-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 20px;
    background: var(--accent-light);
    color: var(--accent);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
}
.article-cat-badge .lucide-icon { width: 14px; height: 14px; }

.article-title {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.4;
    color: var(--text-primary);
    margin-bottom: 16px;
    font-family: var(--font-display);
}

.article-meta-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--text-muted);
}
.article-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.article-meta-item .lucide-icon { width: 14px; height: 14px; }

/* TOCモバイル */
.article-toc-mobile {
    display: none;
    margin-bottom: 24px;
}
.toc-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    width: 100%;
}
.toc-toggle .lucide-icon { width: 16px; height: 16px; color: var(--accent); }
details[open] .toc-toggle { border-radius: var(--radius-md) var(--radius-md) 0 0; }
details .toc-list {
    background: var(--bg-secondary);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    padding: 0 16px 12px;
    margin: 0;
    list-style: none;
}

/* 記事本文 */
.article-body {
    font-size: 16px;
    line-height: 1.85;
    color: var(--text-primary);
}
.article-body h2 {
    font-size: 22px;
    font-weight: 800;
    margin: 48px 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent);
    color: var(--text-primary);
    font-family: var(--font-display);
}
.article-body h2:first-child { margin-top: 0; }
.article-body h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 32px 0 14px;
    padding-left: 14px;
    border-left: 3px solid var(--accent);
    color: var(--text-primary);
}
.article-body p {
    margin-bottom: 18px;
}
.article-body ul, .article-body ol {
    margin: 0 0 18px;
    padding-left: 24px;
}
.article-body li { margin-bottom: 8px; }
.article-body strong { font-weight: 700; color: var(--text-primary); }
.article-body a { color: var(--accent); text-decoration: underline; }
.article-body a:hover { color: var(--accent-dark); }

/* テーブル */
.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 18px 0;
    font-size: 14px;
}
.article-body th, .article-body td {
    padding: 10px 14px;
    border: 1px solid var(--border);
    text-align: left;
}
.article-body th {
    background: var(--accent-light);
    font-weight: 700;
    color: var(--accent-dark);
    white-space: nowrap;
}
.article-body td { background: var(--bg-primary); }

/* info box */
.info-box {
    background: var(--accent-light);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    margin: 18px 0;
    font-size: 14px;
    line-height: 1.7;
}
.info-box-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 8px;
}
.info-box-title .lucide-icon { width: 16px; height: 16px; }

.warn-box {
    background: var(--accent-orange-light);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    margin: 18px 0;
    font-size: 14px;
    line-height: 1.7;
}
.warn-box-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    color: var(--accent-orange);
    margin-bottom: 8px;
}
.warn-box-title .lucide-icon { width: 16px; height: 16px; }

/* 中間CTA */
.article-cta-inline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin: 24px 0;
}
.article-cta-text {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}
.article-cta-text .lucide-icon { width: 18px; height: 18px; color: var(--accent); }

/* FAQ */
.article-faq {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}
.faq-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 24px;
    color: var(--text-primary);
}
.faq-title .lucide-icon { width: 24px; height: 24px; color: var(--accent); }

.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    overflow: hidden;
}
.faq-q {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 16px;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    font-family: inherit;
}
.faq-q:hover { background: var(--bg-secondary); }
.faq-q-badge {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--text-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
}
.faq-q-text { flex: 1; }
.faq-chevron {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    transition: transform 0.2s;
    color: var(--text-muted);
}
.faq-q[aria-expanded="true"] .faq-chevron { transform: rotate(180deg); }
.faq-a {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.faq-a-inner {
    padding: 0 16px 16px 52px;
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-secondary);
}

/* 記事下CTA */
.article-cta-box {
    margin-top: 40px;
}
.article-cta-inner {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    border-radius: var(--radius-lg);
    padding: 36px 32px;
    text-align: center;
    color: var(--text-white);
}
.cta-icon { width: 36px; height: 36px; margin-bottom: 12px; opacity: 0.9; }
.cta-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-white);
}
.cta-desc {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 20px;
}
.cta-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}
.cta-buttons .btn-primary {
    background: var(--text-white);
    color: var(--accent);
}
.cta-buttons .btn-primary:hover { background: var(--bg-secondary); }
.cta-buttons .btn-outline {
    border-color: rgba(255,255,255,0.5);
    color: var(--text-white);
}
.cta-buttons .btn-outline:hover { background: rgba(255,255,255,0.1); }

/* 関連記事 */
.article-related { margin-top: 40px; }
.article-cross { margin-top: 24px; }
.related-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
}
.related-heading .lucide-icon { width: 20px; height: 20px; color: var(--accent); }

.related-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.related-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-primary);
    transition: all var(--transition);
}
.related-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-sm);
    color: var(--text-primary);
}
.related-card-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.related-card-icon .lucide-icon { width: 18px; height: 18px; color: var(--accent); }
.related-card-cat {
    font-size: 11px;
    color: var(--accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.related-card-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    margin: 2px 0 0;
}

/* サイドバー */
.article-sidebar {
    position: sticky;
    top: calc(var(--header-h) + 20px);
    align-self: start;
}
.sidebar-toc {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 16px;
}
.toc-heading {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}
.toc-heading .lucide-icon { width: 16px; height: 16px; color: var(--accent); }

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.toc-item { margin-bottom: 4px; }
.toc-item a {
    display: block;
    padding: 5px 10px;
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 4px;
    line-height: 1.5;
    transition: all var(--transition);
}
.toc-item a:hover { color: var(--accent); background: var(--accent-light); }
.toc-item a.active { color: var(--accent); background: var(--accent-light); font-weight: 600; }
.toc-sub a { padding-left: 22px; font-size: 12px; }

.sidebar-cta {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
}
.sidebar-cta-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 10px;
}
.sidebar-cta-btn { width: 100%; justify-content: center; }

/* レスポンシブ */
@media (max-width: 960px) {
    .article-layout {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .article-sidebar { display: none; }
    .article-toc-mobile { display: block; }
    .article-title { font-size: 22px; }
    .related-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .article-title { font-size: 20px; }
    .article-body h2 { font-size: 19px; }
    .article-body h3 { font-size: 16px; }
    .article-body { font-size: 15px; }
    .article-cta-inline { flex-direction: column; text-align: center; }
    .article-body table { font-size: 13px; }
    .article-body th, .article-body td { padding: 8px 10px; }
    .article-cta-inner { padding: 28px 20px; }
    .faq-a-inner { padding-left: 16px; }
}
