/**
 * ブログ用スタイル
 *
 * このファイルはブログ機能専用のスタイルを定義します。
 * 既存サイトのデザインに馴染むよう設計されています。
 */

/* ============================================
   LP埋め込みセクション用スタイル
   ============================================ */
.wp-post-list-section {
    padding: 60px 20px;
    background: #f9f9f9;
}

.wp-post-list-inner {
    max-width: 1200px;
    margin: 0 auto;
}


/* ============================================
   共通スタイル
   ============================================ */
body.blog-single-page::before {
    background: #fff;
}
#blog {
    display: grid;
    place-items: center;
    min-height: calc(100dvh - 160px);
}

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

.blog-page-title {
    text-align: center;
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 40px;
    color: #333;
}

.blog-loading {
    text-align: center;
    padding: 60px 20px;
    font-size: 16px;
    color: #666;
}

.blog-empty {
    text-align: center;
    padding: 60px 20px;
    font-size: 16px;
    color: #666;
    background: #f5f5f5;
    border-radius: 8px;
}

.blog-error {
    text-align: center;
    padding: 60px 20px;
    background: #fff5f5;
    border-radius: 8px;
    color: #c00;
}

.blog-error button,
.blog-error a {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 30px;
    background: #333;
    color: #fff;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.blog-error button:hover,
.blog-error a:hover {
    background: #555;
}

/* ============================================
   記事一覧 - グリッドレイアウト
   ============================================ */
.blog-flex {
    display: flex;
    flex-direction: column;
    gap: clamp(20px, 2vw, 30px);
}
/* ============================================
   記事カード
   ============================================ */
.blog-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.blog-card a {
    display: flex;
    text-decoration: none;
    color: inherit;
}
@media screen and (max-width: 500px) {
    .blog-card a {
        flex-direction: column;
    }
}

.blog-card-image {
    position: relative;
    width: 40%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    padding: 15px;
    background: #fff;
}
@media screen and (max-width: 500px) {
    .blog-card-image {
        width: 100%;
    }
}

.blog-page .blog-card-image,
.blog-page .blog-card-content {
    width: 100%;
}
@media screen and (max-width: 500px) {
    .blog-page .blog-card-image,
    .blog-page .blog-card-content {
        padding: 0;
    }
    .blog-page .blog-card-image {
        margin-bottom: 25px;
    }
}
.blog-page .blog-card-content .blog-card-date {
    display: block;
    margin-bottom: 1em;
}
.blog-page .blog-card-content .blog-card-body {
    line-height: 1.8em;
    margin-bottom: 40px;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.05);
}

.blog-card-image .no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background-color: #cbcbcb;
    color: #333;
    font-size: 14px;
}

.blog-card-content {
    width: 60%;
    padding: 20px;
}
@media screen and (max-width: 500px) {
    .blog-card-content {
        width: 100%;
    }
}

.blog-card-category {
    display: inline-block;
    padding: 4px 12px;
    background: #e8f4f8;
    color: #0088a9;
    font-size: 12px;
    border-radius: 20px;
    margin-bottom: 10px;
}

.blog-card-title {
    font-size: 16px;
    font-weight: bold;
    line-height: 1.5;
    margin: 0 0 10px;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-excerpt {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    margin: 0 0 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-date {
    font-size: 12px;
    color: #999;
}

/* ============================================
   ページネーション
   ============================================ */
.blog-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.page-btn {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    font-size: 14px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s;
}

.page-btn:hover:not(:disabled) {
    background: #333;
    color: #fff;
    border-color: #333;
}

.page-btn.active {
    background: #333;
    color: #fff;
    border-color: #333;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-btn.prev,
.page-btn.next {
    padding: 0 20px;
}

/* ============================================
   単一記事ページ
   ============================================ */
.blog-single {
    max-width: 1100px;
    margin: 0 auto;
    background: transparent;
    padding: 40px;
}

.blog-page .blog-single {
    padding: 0;
}

@media (max-width: 600px) {
    .blog-single {
        padding: 20px;
        border-radius: 0;
    }
}

.blog-single-header {
    margin-bottom: 30px;
    text-align: center;
}

.blog-single-meta {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.blog-single-date {
    font-size: 14px;
    color: #999;
}

.blog-single-categories {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.blog-category-link {
    display: inline-block;
    padding: 4px 12px;
    background: #e8f4f8;
    color: #0088a9;
    font-size: 12px;
    border-radius: 20px;
    text-decoration: none;
    transition: background 0.3s;
}

.blog-category-link:hover {
    background: #d0e8f0;
}

.blog-single-title {
    font-size: 28px;
    font-weight: bold;
    line-height: 1.4;
    color: #333;
    margin: 0;
}

@media (max-width: 600px) {
    .blog-single-title {
        font-size: 22px;
    }
}

.blog-single-image {
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
}

.blog-single-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* ============================================
   記事本文のスタイル
   ============================================ */
.blog-single-content {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
    min-height: 200px;
    margin-bottom: 40px;
}

.blog-single-content h2 {
    font-size: 24px;
    font-weight: bold;
    margin: 40px 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #333;
}

.blog-single-content h3 {
    font-size: 20px;
    font-weight: bold;
    margin: 30px 0 15px;
}

.blog-single-content h4 {
    font-size: 18px;
    font-weight: bold;
    margin: 25px 0 10px;
}

.blog-single-content p {
    margin: 0 0 20px;
}

.blog-single-content ul,
.blog-single-content ol {
    margin: 0 0 20px;
    padding-left: 25px;
}

.blog-single-content li {
    margin-bottom: 8px;
}

.blog-single-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.blog-single-content a {
    color: #0088a9;
    text-decoration: underline;
}

.blog-single-content a:hover {
    text-decoration: none;
}

.blog-single-content blockquote {
    margin: 20px 0;
    padding: 20px 25px;
    background: #f9f9f9;
    border-left: 4px solid #333;
    font-style: italic;
}

.blog-single-content pre {
    margin: 20px 0;
    padding: 20px;
    background: #2d2d2d;
    color: #f8f8f2;
    border-radius: 4px;
    overflow-x: auto;
    font-size: 14px;
    line-height: 1.5;
}

.blog-single-content code {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 14px;
}

.blog-single-content pre code {
    background: transparent;
    padding: 0;
}

.blog-single-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.blog-single-content th,
.blog-single-content td {
    padding: 12px;
    border: 1px solid #ddd;
    text-align: left;
}

.blog-single-content th {
    background: #f5f5f5;
    font-weight: bold;
}

/* ============================================
   記事フッター
   ============================================ */
.blog-single-footer {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #eee;
    text-align: center;
}

.blog-back-link {
    display: block;
    width: fit-content;
    padding: 12px 30px;
    background: #333;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s;
    margin: 0 auto;
}

.blog-back-link:hover {
    background: #555;
}

/* ============================================
   カテゴリフィルター
   ============================================ */
.blog-categories-filter {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.category-filter-btn {
    padding: 8px 20px;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    font-size: 14px;
    cursor: pointer;
    border-radius: 20px;
    transition: all 0.3s;
}

.category-filter-btn:hover,
.category-filter-btn.active {
    background: #333;
    color: #fff;
    border-color: #333;
}
