/* ========================================
   記事ページ - モダンデザイン
   ======================================== */

/* 記事コンテナ */
.article-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 2rem 5rem;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
}

/* メイン記事 */
article {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.article-header {
    padding: 2.5rem;
    background: linear-gradient(135deg, var(--light) 0%, var(--white) 100%);
    border-bottom: 1px solid var(--light);
}

.article-header h1 {
    font-size: 1.85rem;
    color: var(--dark);
    margin-bottom: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.4;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--gray);
}

.article-meta time {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.category {
    background: var(--gradient);
    color: var(--white);
    padding: 0.35rem 1rem;
    border-radius: 25px;
    font-size: 0.8rem;
    font-weight: 600;
}

.article-content {
    padding: 2.5rem;
}

.article-content h2 {
    font-size: 1.5rem;
    color: var(--dark);
    margin: 3rem 0 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--primary);
    scroll-margin-top: 100px;
    font-weight: 700;
    position: relative;
}

.article-content h2:first-child {
    margin-top: 0;
}

.article-content h3 {
    font-size: 1.2rem;
    color: var(--dark-light);
    margin: 2rem 0 1rem;
    font-weight: 700;
    position: relative;
    padding-left: 1rem;
}

.article-content h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.2rem;
    bottom: 0.2rem;
    width: 4px;
    background: var(--gradient);
    border-radius: 2px;
}

.article-content p {
    margin-bottom: 1.5rem;
    color: var(--dark-light);
    line-height: 2;
}

.article-content ul, .article-content ol {
    margin: 1.5rem 0 2rem 1.5rem;
}

.article-content li {
    margin-bottom: 0.75rem;
    color: var(--dark-light);
    line-height: 1.8;
}

.highlight-box {
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
    border-left: 5px solid var(--primary);
    padding: 2rem;
    margin: 2rem 0;
    border-radius: 0 var(--radius) var(--radius) 0;
}

.highlight-box h4 {
    color: var(--primary-dark);
    margin-bottom: 0.75rem;
    font-weight: 700;
    font-size: 1.1rem;
}

.highlight-box p,
.highlight-box li {
    color: var(--dark-light);
}

.highlight-box ul {
    margin-bottom: 0;
}

/* アイキャッチ画像 */
.article-hero {
    margin: 0;
    padding: 0;
    line-height: 0;
}

.article-hero img {
    width: 100%;
    height: auto;
    display: block;
}

/* 記事内画像 */
.article-image {
    margin: 2.5rem 0;
    text-align: center;
    background: var(--light);
    border-radius: var(--radius);
    padding: 1.5rem;
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.article-image img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.article-image figcaption {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--gray);
    font-weight: 500;
}

/* 比較テーブル */
.comparison-table {
    margin: 2rem 0;
    overflow-x: auto;
}

.comparison-table table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.comparison-table th,
.comparison-table td {
    padding: 1rem 1.25rem;
    text-align: left;
    border-bottom: 1px solid var(--light);
}

.comparison-table th {
    background: var(--gradient);
    color: var(--white);
    font-weight: 600;
    font-size: 0.9rem;
}

.comparison-table th:first-child {
    border-radius: var(--radius) 0 0 0;
}

.comparison-table th:last-child {
    border-radius: 0 var(--radius) 0 0;
}

.comparison-table td {
    font-size: 0.9rem;
    color: var(--dark-light);
}

.comparison-table td:first-child {
    font-weight: 600;
    color: var(--dark);
    background: var(--light);
}

.comparison-table tr:last-child td {
    border-bottom: none;
}

.comparison-table tr:hover td {
    background: rgba(99, 102, 241, 0.05);
}

.comparison-table tr:hover td:first-child {
    background: var(--light);
}

/* 目次 */
.toc {
    background: var(--light);
    padding: 2rem;
    border-radius: var(--radius);
    margin-bottom: 2.5rem;
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.toc h4 {
    margin-bottom: 1rem;
    color: var(--dark);
    font-weight: 700;
    font-size: 1.1rem;
}

.toc ol {
    margin-left: 1.25rem;
    margin-bottom: 0;
}

.toc li {
    margin-bottom: 0.6rem;
    color: var(--gray);
}

.toc a {
    color: var(--gray);
    font-weight: 500;
    transition: all 0.3s ease;
}

.toc a:hover {
    color: var(--primary);
    padding-left: 5px;
}

/* 著者情報 */
.author-box {
    background: var(--light);
    padding: 2rem;
    margin-top: 3rem;
    border-radius: var(--radius);
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.author-avatar {
    width: 80px;
    height: 80px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 2rem;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.author-info h4 {
    color: var(--dark);
    margin-bottom: 0.5rem;
    font-weight: 700;
    font-size: 1.1rem;
}

.author-info p {
    font-size: 0.9rem;
    color: var(--gray);
    margin: 0;
    line-height: 1.7;
}

/* サイドバー */
aside {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sidebar-widget {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow);
    position: sticky;
    top: 100px;
}

.sidebar-widget h3 {
    font-size: 1rem;
    color: var(--dark);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary);
    font-weight: 700;
}

.related-list {
    list-style: none;
}

.related-list li {
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--light);
}

.related-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.related-list a {
    font-size: 0.9rem;
    color: var(--gray);
    font-weight: 500;
    transition: all 0.3s ease;
    display: block;
}

.related-list a:hover {
    color: var(--primary);
    padding-left: 5px;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.tag {
    background: var(--light);
    padding: 0.4rem 1rem;
    border-radius: 25px;
    font-size: 0.8rem;
    color: var(--gray);
    font-weight: 500;
    transition: all 0.3s ease;
}

.tag:hover {
    background: var(--gradient);
    color: var(--white);
    text-decoration: none;
    transform: translateY(-2px);
}

/* フッター */
footer {
    text-align: center;
}

/* レスポンシブ */
@media (max-width: 900px) {
    .article-container {
        grid-template-columns: 1fr;
        padding: 1.5rem;
    }

    .sidebar-widget {
        position: static;
    }
}

@media (max-width: 768px) {
    .article-header {
        padding: 1.75rem;
    }

    .article-header h1 {
        font-size: 1.4rem;
    }

    .article-content {
        padding: 1.75rem;
    }

    .author-box {
        flex-direction: column;
        text-align: center;
    }
}
