/* ========================================
   ブログ記事詳細ページ CSS
   ======================================== */

/* 記事レイアウト（メイン + サイドバー） */
.article-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px 60px;
}

/* ========================================
   記事ヒーロー画像
   ======================================== */
.article-hero {
    width: 100%;
    max-height: 400px;
    overflow: hidden;
    background: var(--deep-blue);
}

.article-hero img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
}

/* ========================================
   記事メインエリア
   ======================================== */
.article-main {
    min-width: 0;
}

.article-content {
    padding: 30px 35px;
    line-height: 1.9;
}

/* 記事ヘッダー */
.article-header {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 4px solid var(--emerald-green);
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.tag-research {
    background: #FCE4EC;
    color: #C62828;
    border-color: #EF5350;
}

.article-title {
    font-size: 24px;
    font-weight: 900;
    line-height: 1.5;
    color: var(--dark-gray);
    margin-bottom: 15px;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
    color: #888;
}

/* 結論ボックス */
.article-summary-box {
    background: linear-gradient(135deg, #E8F5E9, #C8E6C9);
    border: 3px solid var(--emerald-green);
    border-left: 6px solid var(--emerald-green);
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 4px 4px 0 var(--shadow);
}

.summary-title {
    font-size: 18px;
    font-weight: 900;
    color: var(--dark-gray);
    margin-bottom: 12px;
}

.summary-list {
    list-style: none;
    padding: 0;
}

.summary-list li {
    padding: 8px 0 8px 28px;
    position: relative;
    line-height: 1.7;
}

.summary-list li::before {
    content: '✅';
    position: absolute;
    left: 0;
    top: 8px;
}

/* 目次 */
.article-toc {
    background: #F5F5F5;
    border: 3px solid var(--dark-gray);
    padding: 25px;
    margin-bottom: 35px;
    box-shadow: 4px 4px 0 var(--shadow);
}

.toc-title {
    font-size: 16px;
    font-weight: 900;
    margin-bottom: 12px;
    color: var(--dark-gray);
}

.toc-list {
    padding-left: 20px;
}

.toc-list li {
    padding: 6px 0;
}

.toc-list a {
    color: var(--deep-blue);
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    transition: color 0.2s;
}

.toc-list a:hover {
    color: var(--emerald-green);
    text-decoration: underline;
}

/* 本文セクション */
.article-section {
    margin-bottom: 40px;
}

.article-section h2 {
    font-size: 22px;
    font-weight: 900;
    color: var(--deep-blue);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--emerald-green);
    border-left: 6px solid var(--deep-blue);
    padding-left: 15px;
}

.article-section h3 {
    font-size: 18px;
    font-weight: 900;
    color: var(--dark-gray);
    margin: 25px 0 12px;
}

.article-section h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--deep-blue);
    margin: 15px 0 8px;
}

.article-section p {
    margin-bottom: 16px;
    font-size: 15px;
}

.article-section mark {
    background: linear-gradient(transparent 60%, #FFEB3B 60%);
    padding: 2px 4px;
}

/* 図表 */
.article-figure {
    margin: 25px 0;
    text-align: center;
}

.article-figure img {
    max-width: 100%;
    height: auto;
    border: 3px solid var(--emerald-green);
    box-shadow: 6px 6px 0 var(--shadow);
}

.article-figure figcaption {
    font-size: 12px;
    color: #888;
    margin-top: 10px;
    font-style: italic;
}

/* 論文情報カード */
.paper-info-card {
    background: #F3F8FF;
    border: 3px solid var(--ocean-blue);
    padding: 20px;
    margin: 20px 0;
    box-shadow: 4px 4px 0 var(--shadow);
}

.paper-info-card h3 {
    margin: 0 0 15px;
    color: var(--deep-blue);
}

.paper-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.paper-table th {
    text-align: left;
    padding: 10px 12px;
    background: var(--deep-blue);
    color: var(--white);
    width: 100px;
    vertical-align: top;
    border: 1px solid var(--dark-gray);
    font-size: 12px;
}

.paper-table td {
    padding: 10px 12px;
    border: 1px solid var(--light-gray);
    background: var(--white);
}

/* 結果カード */
.result-card {
    background: var(--white);
    border: 3px solid var(--light-gray);
    border-left: 6px solid var(--emerald-green);
    padding: 20px 20px 10px;
    margin: 20px 0;
    box-shadow: 3px 3px 0 var(--shadow);
}

.result-card h3 {
    margin: 0 0 10px;
    font-size: 16px;
}

/* 引用 */
.article-quote {
    background: #FFF8E1;
    border-left: 6px solid #FFB300;
    padding: 20px;
    margin: 20px 0;
    font-style: italic;
    font-weight: 700;
    color: var(--dark-gray);
    box-shadow: 3px 3px 0 var(--shadow);
}

/* 経験カード */
.experience-card {
    background: #E8F5E9;
    border: 3px solid var(--emerald-green);
    padding: 25px;
    margin: 20px 0;
    box-shadow: 4px 4px 0 var(--shadow);
}

.experience-card>h3 {
    margin: 0 0 15px;
}

.experience-item {
    background: var(--white);
    padding: 16px;
    margin: 12px 0;
    border-left: 4px solid var(--grass-green);
}

.experience-item h4 {
    margin: 0 0 8px;
}

.experience-item p {
    margin: 0;
    font-size: 14px;
}

/* ハイライトボックス */
.highlight-box {
    background: linear-gradient(135deg, #E3F2FD, #BBDEFB);
    border: 3px solid var(--ocean-blue);
    border-left: 6px solid var(--deep-blue);
    padding: 20px;
    margin: 25px 0;
    box-shadow: 4px 4px 0 var(--shadow);
}

.highlight-box p {
    margin: 0;
    font-size: 14px;
    line-height: 1.8;
}

/* Tips グリッド */
.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.tip-card {
    background: var(--white);
    border: 3px solid var(--dark-gray);
    padding: 20px;
    text-align: center;
    box-shadow: 4px 4px 0 var(--shadow);
    transition: transform 0.2s;
}

.tip-card:hover {
    transform: translateY(-4px);
    box-shadow: 6px 6px 0 var(--shadow);
}

.tip-icon {
    font-size: 36px;
    margin-bottom: 10px;
}

.tip-card h3 {
    font-size: 14px;
    margin-bottom: 10px;
    color: var(--deep-blue);
}

.tip-card p {
    font-size: 13px;
    text-align: left;
}

.tip-card a {
    color: var(--deep-blue);
}

/* ========================================
   CTA
   ======================================== */
.article-cta {
    margin: 40px 0;
}

.cta-inner {
    text-align: center;
    background: linear-gradient(135deg, #E3F2FD, #C8E6C9);
    border-color: var(--emerald-green);
    padding: 35px;
}

.cta-inner h2 {
    font-size: 20px;
    color: var(--deep-blue);
    margin-bottom: 15px;
    line-height: 1.5;
}

.cta-inner p {
    font-size: 14px;
    margin-bottom: 10px;
}

.cta-highlight {
    font-weight: 900;
    color: var(--deep-blue);
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    padding: 18px 35px;
    background: var(--grass-green);
    color: var(--white);
    text-decoration: none;
    font-family: 'Press Start 2P', cursive;
    font-size: 12px;
    border: 4px solid var(--dark-gray);
    box-shadow: 6px 6px 0 var(--shadow);
    transition: all 0.2s;
}

.cta-button:hover {
    background: var(--light-green);
    color: var(--dark-gray);
    transform: translateY(-3px);
    box-shadow: 8px 8px 0 var(--shadow);
}

.cta-icon {
    font-size: 22px;
}

.cta-text {
    display: flex;
    flex-direction: column;
    text-align: left;
    gap: 4px;
}

.cta-sub {
    font-size: 9px;
    opacity: 0.8;
}

.cta-main {
    font-size: 13px;
}

/* 参考文献 */
.reference-list {
    padding-left: 20px;
    font-size: 13px;
    color: #666;
}

.reference-list li {
    padding: 8px 0;
    border-bottom: 1px dashed var(--light-gray);
    line-height: 1.7;
}

.reference-list em {
    font-style: italic;
}

/* 著者カード */
.article-footer-info {
    margin-top: 40px;
    padding-top: 25px;
    border-top: 4px solid var(--emerald-green);
}

.author-card {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.author-icon {
    font-size: 50px;
    background: #E8F5E9;
    width: 80px;
    height: 80px;
    line-height: 80px;
    text-align: center;
    border: 3px solid var(--dark-gray);
    box-shadow: 4px 4px 0 var(--shadow);
    flex-shrink: 0;
}

.author-info h3 {
    font-size: 12px;
    color: #888;
    margin-bottom: 4px;
}

.author-name {
    font-size: 18px;
    font-weight: 900;
    color: var(--dark-gray);
    margin-bottom: 8px;
}

.author-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.7;
}

/* ========================================
   SNSシェア
   ======================================== */
.share-section {
    margin: 25px 0;
    text-align: center;
}

.share-title {
    font-size: 14px;
    font-weight: 900;
    margin-bottom: 12px;
    color: var(--dark-gray);
}

.share-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.share-btn {
    padding: 10px 20px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    border: 3px solid var(--dark-gray);
    box-shadow: 3px 3px 0 var(--shadow);
    transition: all 0.2s;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 5px 5px 0 var(--shadow);
}

.share-x {
    background: #000;
    color: #fff;
}

.share-line {
    background: #06C755;
    color: #fff;
}

.share-copy {
    background: var(--white);
    color: var(--dark-gray);
}

/* ========================================
   関連記事
   ======================================== */
.related-section {
    margin-top: 30px;
}

.related-title {
    font-size: 16px;
    font-weight: 900;
    color: var(--deep-blue);
    margin-bottom: 20px;
    display: inline-block;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.related-card {
    text-decoration: none;
    color: var(--dark-gray);
    padding: 0;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.related-card:hover {
    transform: translateY(-4px);
    box-shadow: 8px 8px 0 var(--shadow);
}

.related-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
    border-bottom: 3px solid var(--emerald-green);
}

.related-card h3 {
    font-size: 13px;
    font-weight: 700;
    padding: 12px 12px 5px;
    line-height: 1.4;
}

.related-card time {
    font-size: 11px;
    color: #888;
    padding: 0 12px 12px;
    display: block;
}

/* ========================================
   サイドバー
   ======================================== */
.article-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-card {
    padding: 20px;
}

.sidebar-title {
    font-size: 14px;
    font-weight: 900;
    color: var(--deep-blue);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 3px solid var(--emerald-green);
}

.sidebar-card p {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 10px;
}

.sidebar-link {
    display: inline-block;
    font-size: 13px;
    color: var(--deep-blue);
    font-weight: 700;
    text-decoration: none;
    transition: color 0.2s;
}

.sidebar-link:hover {
    color: var(--emerald-green);
}

.sidebar-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.sidebar-tag {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border: 2px solid;
    text-decoration: none;
    transition: all 0.2s;
}

.sidebar-tag:hover {
    transform: scale(1.05);
}

/* サイドバーCTA */
.sidebar-cta {
    background: linear-gradient(135deg, #E8F5E9, #C8E6C9);
    border-color: var(--emerald-green);
}

.sidebar-cta-btn {
    display: block;
    text-align: center;
    padding: 12px;
    background: var(--grass-green);
    color: var(--white);
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
    border: 3px solid var(--dark-gray);
    box-shadow: 3px 3px 0 var(--shadow);
    transition: all 0.2s;
    font-family: 'Press Start 2P', cursive;
}

.sidebar-cta-btn:hover {
    background: var(--light-green);
    color: var(--dark-gray);
    transform: translateY(-2px);
    box-shadow: 5px 5px 0 var(--shadow);
}

/* 新着記事リスト */
.sidebar-recent {
    list-style: none;
    padding: 0;
}

.sidebar-recent li {
    padding: 10px 0;
    border-bottom: 1px dashed var(--light-gray);
}

.sidebar-recent li:last-child {
    border-bottom: none;
}

.sidebar-recent a {
    font-size: 13px;
    color: var(--dark-gray);
    text-decoration: none;
    font-weight: 700;
    display: block;
    line-height: 1.4;
    transition: color 0.2s;
}

.sidebar-recent a:hover {
    color: var(--deep-blue);
}

.sidebar-recent time {
    font-size: 11px;
    color: #aaa;
    display: block;
    margin-top: 4px;
}

/* ========================================
   レスポンシブ
   ======================================== */
@media (max-width: 900px) {
    .article-layout {
        grid-template-columns: 1fr;
    }

    .article-sidebar {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .sidebar-card {
        flex: 1 1 250px;
    }

    .related-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .article-content {
        padding: 20px 18px;
    }

    .article-title {
        font-size: 20px;
    }

    .article-hero img {
        height: 250px;
    }

    .article-meta {
        flex-direction: column;
        gap: 6px;
    }

    .author-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .tips-grid {
        grid-template-columns: 1fr;
    }

    .cta-button {
        font-size: 10px;
        padding: 14px 20px;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

    .share-buttons {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .article-title {
        font-size: 18px;
    }

    .article-section h2 {
        font-size: 18px;
    }

    .paper-table th,
    .paper-table td {
        display: block;
        width: 100%;
    }

    .paper-table th {
        border-bottom: none;
    }
}