/*
Theme Name: Medical Blog
Theme URI: https://example.com
Author: Your Name
Author URI: https://example.com
Description: 医療系ブログのためのモダンで清潔感のあるWordPressテーマ
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: medical-blog
*/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
    line-height: 1.8;
    color: #333;
    background-color: #f8f9fa;
}

/* ヘッダー */
header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c5aa0;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #2c5aa0 0%, #4a90e2 100%);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

nav a {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    transition: color 0.3s;
}

nav a:hover {
    color: #2c5aa0;
}

/* メインコンテンツ */
.main-container {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
}

/* 記事一覧 */
.article-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.article-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    gap: 1.5rem;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.article-thumbnail {
    width: 280px;
    height: 200px;
    object-fit: cover;
    flex-shrink: 0;
}

.article-content {
    padding: 1.5rem 1.5rem 1.5rem 0;
    flex: 1;
}

.article-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.8rem;
    font-size: 0.85rem;
    color: #777;
}

.article-category {
    background: #e3f2fd;
    color: #2c5aa0;
    padding: 0.2rem 0.8rem;
    border-radius: 4px;
    font-weight: 600;
}

.article-date {
    display: flex;
    align-items: center;
}

.article-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #222;
    margin-bottom: 0.8rem;
    line-height: 1.4;
}

.article-title a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

.article-title a:hover {
    color: #2c5aa0;
}

.article-excerpt {
    color: #666;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.read-more {
    color: #2c5aa0;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: gap 0.3s;
}

.read-more:hover {
    gap: 0.6rem;
}

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

.sidebar-widget {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #222;
    margin-bottom: 1rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid #e3f2fd;
}

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

.category-list li {
    padding: 0.6rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.category-list li:last-child {
    border-bottom: none;
}

.category-list a {
    text-decoration: none;
    color: #555;
    display: flex;
    justify-content: space-between;
    transition: color 0.3s;
}

.category-list a:hover {
    color: #2c5aa0;
}

.post-count {
    color: #999;
    font-size: 0.9rem;
}

/* フッター */
footer {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 2rem;
    margin-top: 4rem;
    text-align: center;
}

/* 単一記事ページ */
.single-post-content {
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.single-post-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e0e0e0;
}

.single-post-title {
    font-size: 2rem;
    font-weight: 700;
    color: #222;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.single-post-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: #777;
}

.post-content {
    font-size: 1.05rem;
    line-height: 1.9;
}

.post-content h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #222;
    margin: 2rem 0 1rem;
}

.post-content h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #222;
    margin: 1.5rem 0 0.8rem;
}

.post-content p {
    margin-bottom: 1.5rem;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 2rem 0;
}

/* 記事ページのアイキャッチ画像 */
.post-thumbnail {
    margin-bottom: 2rem;
}

.post-thumbnail img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 12px;
}

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

.post-content li {
    margin-bottom: 0.5rem;
}

/* ページネーション */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.pagination a,
.pagination span {
    padding: 0.5rem 1rem;
    background: white;
    border-radius: 6px;
    text-decoration: none;
    color: #555;
    transition: all 0.3s;
}

.pagination a:hover {
    background: #2c5aa0;
    color: white;
}

.pagination .current {
    background: #2c5aa0;
    color: white;
}

/* レスポンシブ */
@media (max-width: 968px) {
    .main-container {
        grid-template-columns: 1fr;
    }

    .article-card {
        flex-direction: column;
    }

    .article-thumbnail {
        width: 100%;
        height: 240px;
    }

    .article-content {
        padding: 1.5rem;
    }

    nav ul {
        gap: 1rem;
    }

    .single-post-content {
        padding: 2rem;
    }

    .single-post-title {
        font-size: 1.6rem;
    }
}

@media (max-width: 640px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
    }

    nav ul {
        font-size: 0.9rem;
    }

    .article-title {
        font-size: 1.2rem;
    }

    .single-post-content {
        padding: 1.5rem;
    }

    .single-post-title {
        font-size: 1.4rem;
    }
}
