/* blog_new/assets/css/blog.css */

:root {
    --accent-blog: #bfa378; /* ゴールド */
    --bg-light: #fdfdfd;
    --text-dark: #222;
    --text-gray: #666;
}

.blog-body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    font-family: 'Montserrat', 'Noto Serif JP', serif;
}

.blog-header {
    background: #fff;
    padding: 30px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 40px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.blog-logo {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-dark);
    text-decoration: none;
    letter-spacing: 0.1em;
}

.logo-sub {
    font-size: 0.8rem;
    color: var(--accent-blog);
    vertical-align: middle;
    margin-left: 5px;
    border: 1px solid var(--accent-blog);
    padding: 2px 5px;
}

.blog-nav {
    display: flex;
    gap: 25px;
    align-items: center;
}

.blog-nav .nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-size: 0.9rem;
    font-weight: 500;
    transition: 0.3s;
}

.blog-nav .nav-link:hover {
    color: var(--accent-blog);
}

.blog-nav .nav-link.highlight {
    background: var(--accent-blog);
    color: #fff;
    padding: 8px 18px;
    border-radius: 4px;
}

/* ヒーローセクション */
.blog-hero {
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('https://www.cappa2016.com/assets/images/hero.jpg');
    background-size: cover;
    background-position: center;
    color: #fff;
    padding: 80px 0;
    text-align: center;
    margin-bottom: 60px;
}

.blog-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    letter-spacing: 0.1em;
}

.blog-hero p {
    font-size: 1rem;
    color: var(--accent-blog);
    letter-spacing: 0.05em;
}

/* メインコンテンツレイアウト */
.blog-main-container {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto 80px;
    padding: 0 20px;
}

@media (max-width: 992px) {
    .blog-main-container {
        grid-template-columns: 1fr;
    }
}

/* 記事リスト */
.post-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.post-card {
    display: flex;
    gap: 25px;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    transition: 0.3s;
    border: 1px solid #eee;
}

@media (max-width: 640px) {
    .post-card {
        flex-direction: column;
        gap: 0;
    }
    .post-thumb {
        width: 100% !important;
        height: 200px !important;
    }
    .post-content {
        padding: 20px !important;
    }
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

.post-thumb {
    width: 280px;
    height: 180px;
    flex-shrink: 0;
    background: #f5f5f5;
}

.post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-content {
    padding: 20px 20px 20px 0;
    display: flex;
    flex-direction: column;
}

.post-meta {
    font-size: 0.75rem;
    color: var(--text-gray);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.post-category {
    background: var(--accent-blog);
    color: #fff;
    padding: 1px 10px;
    border-radius: 20px;
    font-weight: 600;
}

.post-title {
    font-size: 1.25rem;
    margin-bottom: 12px;
    line-height: 1.5;
    font-weight: 600;
}

.post-title a {
    text-decoration: none;
    color: var(--text-dark);
}

.post-excerpt {
    font-size: 0.9rem;
    color: var(--text-gray);
    line-height: 1.7;
    margin-bottom: 15px;
}

.post-more {
    margin-top: auto;
    color: var(--accent-blog);
    font-weight: bold;
    text-decoration: none;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* サイドバー */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.widget-title {
    font-size: 1rem;
    border-bottom: 2px solid var(--accent-blog);
    padding-bottom: 8px;
    margin-bottom: 15px;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.widget-content ul {
    list-style: none;
    padding: 0;
}

.widget-content ul li {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.widget-content ul li a {
    text-decoration: none;
    color: var(--text-dark);
    font-size: 0.85rem;
    line-height: 1.5;
    display: block;
    transition: 0.3s;
}

.widget-content ul li a:hover {
    color: var(--accent-blog);
}

/* フッター */
.blog-footer {
    background: #111;
    color: #fff;
    padding: 60px 0 20px;
}

.footer-inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
    max-width: 1200px;
    margin: 0 auto 40px;
    padding: 0 20px;
}

@media (max-width: 768px) {
    .footer-inner {
        grid-template-columns: 1fr;
    }
}

.footer-logo {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.footer-desc {
    color: #999;
    font-size: 0.85rem;
    line-height: 1.8;
}

.footer-links h4 {
    color: var(--accent-blog);
    margin-bottom: 20px;
    font-size: 1rem;
}

.footer-links ul li {
    margin-bottom: 10px;
    list-style: none;
}

.footer-links ul li a {
    color: #ccc;
    text-decoration: none;
    font-size: 0.85rem;
    transition: 0.3s;
}

.footer-links ul li a:hover {
    color: #fff;
}

.footer-copy {
    text-align: center;
    border-top: 1px solid #222;
    padding-top: 20px;
    color: #555;
    font-size: 0.75rem;
}

/* 追加スタイル: 検索バー */
.search-widget-form {
    display: flex;
    gap: 5px;
}
.search-widget-form input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}
.search-widget-form button {
    background: var(--accent-blog);
    color: #fff;
    border: none;
    padding: 0 15px;
    border-radius: 4px;
    cursor: pointer;
}

/* 追加スタイル: プロフィール */
.profile-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
}
.profile-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
    border: 3px solid var(--accent-blog);
}
.profile-name {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 5px;
}
.profile-title {
    color: var(--accent-blog);
    font-size: 0.9rem;
    margin-bottom: 20px;
}
.profile-text {
    text-align: left;
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--text-gray);
}

/* 追加スタイル: 関連記事 */
.related-posts {
    margin-top: 60px;
    border-top: 1px solid #eee;
    padding-top: 40px;
}
.related-title {
    font-size: 1.3rem;
    margin-bottom: 25px;
    font-weight: 600;
}
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}
.related-item {
    text-decoration: none;
    color: inherit;
}
.related-thumb {
    height: 120px;
    background: #f5f5f5;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}
.related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.related-item-title {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.4;
}

/* ==============================
   モバイル表示の修正
   ============================== */
@media (max-width: 640px) {
    /* ヘッダーナビ: 単語途中で折り返して縦に間延びしていた問題を修正 */
    .header-inner {
        flex-wrap: wrap;
        row-gap: 10px;
    }
    .blog-logo {
        font-size: 1.4rem;
    }
    .blog-nav {
        gap: 14px;
        flex-wrap: wrap;
    }
    .blog-nav .nav-link {
        font-size: 0.78rem;
        white-space: nowrap;
    }
    .blog-nav .nav-link.highlight {
        padding: 6px 12px;
    }

    /* ヒーロー見出し: 大きすぎて何行にも折り返していた問題を修正 */
    .blog-hero {
        padding: 50px 0 !important;
    }
    .blog-hero h1 {
        font-size: 1.6rem !important;
        line-height: 1.4 !important;
    }
    .blog-hero p {
        font-size: 0.85rem !important;
    }

    /* 記事詳細: 余白過多・見出し巨大化の問題を修正（detail.phpのインラインstyleを上書き） */
    .article-detail {
        padding: 20px !important;
    }
    .article-detail h1 {
        font-size: 1.4rem !important;
        line-height: 1.4 !important;
        margin: 12px 0 24px !important;
    }
    .article-body {
        font-size: 0.95rem !important;
    }
    .article-body h2 {
        font-size: 1.15rem !important;
    }

    /* デザインカード等のグリッドは1〜2列に */
    .article-body div[style*="grid-template-columns:repeat(auto-fill,minmax(160px"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}
