/* ブログページ用スタイルシート */

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Hiragino Kaku Gothic Pro', 'Meiryo', 'Yu Gothic', sans-serif;
    line-height: 1.8;
    color: #333;
    background-color: #fafafa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: linear-gradient(135deg, #1a365d 0%, #2c5282 100%);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

.logo h1 a {
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
}

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

.nav-menu a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: white;
    background: rgba(255,255,255,0.1);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: white;
    margin: 3px 0;
    transition: 0.3s;
}

/* ブログ記事ヘッダー */
.blog-header {
    background: linear-gradient(135deg, #1a365d 0%, #2c5282 100%);
    padding: 3rem 0;
    color: white;
    margin-bottom: 2rem;
}

.blog-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.blog-meta {
    display: flex;
    gap: 2rem;
    font-size: 0.95rem;
    opacity: 0.9;
}

.blog-meta time,
.blog-meta .author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 2カラムレイアウト */
.blog-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 20px;
}

.main-content {
    background: white;
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* 記事内の画像 */
.main-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 2rem 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.featured-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 2rem;
}

/* 見出し */
.main-content h2 {
    font-size: 1.8rem;
    color: #1a365d;
    margin: 2.5rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid #2c5282;
}

.main-content h3 {
    font-size: 1.4rem;
    color: #2c5282;
    margin: 2rem 0 1rem;
}

.main-content h4 {
    font-size: 1.2rem;
    color: #333;
    margin: 1.5rem 0 0.8rem;
}

/* 段落とテキスト */
.main-content p {
    margin: 1.2rem 0;
    line-height: 1.9;
}

.main-content ul,
.main-content ol {
    margin: 1.2rem 0 1.2rem 2rem;
    line-height: 1.9;
}

.main-content li {
    margin: 0.5rem 0;
}

.main-content strong {
    color: #1a365d;
    font-weight: 600;
}

/* サイドバー */
.sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.sidebar-section {
    background: white;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.sidebar-section h3 {
    font-size: 1.2rem;
    color: #1a365d;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #2c5282;
}

/* 目次 */
.toc ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.toc li {
    margin: 0.8rem 0;
}

.toc a {
    color: #2c5282;
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
}

.toc a:hover {
    color: #1a365d;
    background: rgba(44, 82, 130, 0.1);
}

/* 広告スペース */
.ad-space {
    background: #f5f5f5;
    padding: 2rem;
    text-align: center;
    border-radius: 8px;
    border: 1px dashed #ccc;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

/* シェアボタン */
.share-buttons {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    color: white;
}

.share-btn.twitter {
    background: #1DA1F2;
}

.share-btn.twitter:hover {
    background: #0d8bd9;
}

.share-btn.facebook {
    background: #1877F2;
}

.share-btn.facebook:hover {
    background: #0c63d4;
}

/* ブログ一覧ページ */
.blog-list {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 20px;
}

.blog-list h1 {
    font-size: 2.5rem;
    color: #1a365d;
    margin-bottom: 2rem;
    text-align: center;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.blog-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.blog-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.blog-card-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-card h2 {
    font-size: 1.3rem;
    color: #1a365d;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.blog-card-date {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.blog-card-excerpt {
    color: #555;
    line-height: 1.7;
    margin-bottom: 1rem;
    flex: 1;
}

.blog-card-link {
    color: #2c5282;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.blog-card-link:hover {
    color: #1a365d;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #1a365d 0%, #2c5282 100%);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin: 0.5rem 0;
}

.footer-section a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.2);
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    .blog-header h1 {
        font-size: 1.8rem;
    }

    .blog-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .sidebar {
        position: static;
    }

    .main-content {
        padding: 1.5rem;
    }

    .main-content h2 {
        font-size: 1.5rem;
    }

    .main-content h3 {
        font-size: 1.2rem;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .share-buttons {
        flex-direction: column;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .blog-header h1 {
        font-size: 1.5rem;
    }

    .main-content h2 {
        font-size: 1.3rem;
    }
}
