/* ブログ関連のスタイル */
.blog-container {
    margin: 20px;
    background-color: white;
}

.post-content {
    margin: 20px;
    color: black;
}

/* ブログ記事一覧テーブル */
.blog-posts-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.blog-posts-table th,
.blog-posts-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #ddd; 
}

.blog-posts-table tbody tr:hover {
    background-color: #f5f5f5;
}

.blog-posts-table .btn {
    padding: 8px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
}

.blog-posts-table .btn-edit {
    background-color: #2563EB;
    color: white;
    margin-right: 5px;
}

.blog-posts-table .btn-delete {
    background-color: #EF4444;
    color: white;
}


/* ブログ一覧ページ用の新しいスタイル */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    padding: 20px 0;
}

.feature-section {
    padding-bottom: 4.5rem;
    margin-bottom: 3rem;
}

.feature-grid-wrapper {
    max-width: 1400px;
    margin: 0 auto;
}

.feature-card {
    display: flex;
    padding: 1.5em;
    position: relative; /* 追加: アイコンの位置調整のため */
    flex-direction: column;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

/* feature-iconに対するスタイル追加 */
.feature-card .feature-icon {
    width: 24px; /* アイコンの幅 */
    height: 24px; /* アイコンの高さ */
    color: #2563EB; /* アイコンの色を青に */
    margin-left: 40px;
    margin-bottom: 0px; /* アイコンとタイトルの間の余白 */
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.12);
}

.feature-card .post-image {
    width: 100%;
    height: 200px;
    object-fit: contain;  /* 変更: coverからcontainに */
    background-color: #f0f0f0;  /* 追加: 背景色を設定 */
}

.feature-card .feature-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2563EB;
    padding: 15px 15px 5px;
    line-height: 1.4;
}

.feature-card .post-date {
    font-size: 0.8rem;
    color: #6B7280;
    padding: 0 15px 10px;
}

.feature-card .feature-description {
    font-size: 0.9rem;
    color: #4B5563;
    padding: 0 15px 15px;
    line-height: 1.6;
    flex-grow: 1;
}

.feature-card--media,
.feature-card--action {
    cursor: pointer;
}

/* カテゴリタブのスタイルを更新 */
.category-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

.category-tab {
    padding: 12px 24px;
    margin: 0 8px;
    border: none;
    border-radius: 20px;
    background-color: #f0f0f0;
    color: #6B7280;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 500;
}

.category-tab:hover {
    background-color: #e0e0e0;
    color: #4B5563;
}

.category-tab.active {
    background-color: #2563EB;
    color: white;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

/* 以下、残りのCSSは変更なし */
.blog-detail-section {
    background-color: #f4f7f6;
    padding: 40px 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.blog-detail-container {
    background-color: white;
    box-shadow: 0 4px 6px rgb(48,54,66,0.95);
    width: 100%;
    max-width: 800px; /* PCでの最大幅を固定 */
    box-sizing: border-box;
    border-radius: 12px;
    padding: 30px; /* PCでのパディング */
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.blog-detail-title {
    color: rgb(48,54,66,0.95);
    font-size: 2.2rem;
    margin-bottom: 15px;
    line-height: 1.3;
    box-sizing: border-box;
}

.blog-detail-meta {
    color: #9CA3AF;
    font-size: 0.9rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.blog-detail-image {
    max-width: 100%; /* 画像が親要素からはみ出さないように修正 */
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
    object-fit: contain;
    box-sizing: border-box;
}

.blog-detail-content {
    line-height: 1.7;
    color: rgb(48,54,66,0.95);
    box-sizing: border-box;
}

.blog-detail-content h1,
.blog-detail-content h2,
.blog-detail-content h3,
.blog-detail-content h4,
.blog-detail-content h5,
.blog-detail-content h6,
.blog-detail-content p,
.blog-detail-content a,
.blog-detail-content ul,
.blog-detail-content ol,
.blog-detail-content pre,
.blog-detail-content code {
    max-width: 100%; /* コンテンツ内の要素が親要素からはみ出さないように修正 */
    box-sizing: border-box;
}

.blog-detail-content img {
    max-width: 100%;
    height: auto;
    display: block; /* 画像の余白をなくす */
}

.blog-detail-content table {
    width: 100%;
    display: block; /* テーブルがはみ出す場合に対応 */
    overflow-x: auto; /* 横スクロールを可能にする */
    -webkit-overflow-scrolling: touch; /* iOSでのスムーズなスクロール */
    border-collapse: collapse;
}

.blog-detail-content th,
.blog-detail-content td {
    white-space: nowrap; /* セル内のテキストの折り返しを防ぐ */
    padding: 8px;
    border: 1px solid #ddd;
}

.blog-detail-content pre {
    overflow-x: auto; /* コードブロックがはみ出す場合に対応 */
    -webkit-overflow-scrolling: touch;
    padding: 16px;
    background-color: #f4f4f4;
    border-radius: 8px;
    font-size: 0.9em;
}

.blog-detail-content code {
    word-break: break-all; /* 長い単語の折り返し */
    white-space: pre-wrap; /* コードの折り返し */
}

.blog-detail-back-btn {
    display: inline-block;
    width: 200px;
    padding: 0.75rem 1.5rem;
    background-color: #2563EB;
    color: white;
    text-decoration: none;
    border-radius: 9999px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
    margin-top: 20px;
}

.blog-detail-back-btn:hover {
    background-color: #1D4ED8;
}

.blog-header {
    display: flex;
    background-color: rgb(255,255,255,0.95);
    justify-content: flex-start;
    margin-top: 20px;
    padding-left: 20px;
}

.blog-header .btn {
    margin-top: 0;
    margin-bottom: 20px;
}

/* X共有ボタン */
.share-x-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: #000;
    color: #fff;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
    margin-left: 16px;
}

.share-x-btn:hover {
    background-color: #333;
}

.share-x-btn svg {
    width: 16px;
    height: 16px;
}

/* お問い合わせボタンのスタイル */
.btn[onclick="openConsultationDialog()"] {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: #10B981;  /* 緑色に変更 */
    color: white;
    border: none;
    border-radius: 9999px;
    font-size: 1rem;
    font-weight: 600;
    text-transform: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    margin-top: 20px;
    margin-left: 15px;  /* 前のボタンとの間隔 */
    width: 80%;
}

.btn[onclick="openConsultationDialog()"]:hover {
    background-color: #059669;  /* ホバー時の色 */
    transform: translateY(-2px);
}

/* ページャスタイル */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #2563EB;
    border-radius: 8px;
    background-color: white;
    color: #2563EB;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.page-btn:hover {
    background-color: #2563EB;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
}

.page-btn.active {
    background-color: #2563EB;
    color: white;
    font-weight: 600;
    pointer-events: none;
}

/* レスポンシブ対応 */
@media screen and (max-width: 768px) {
    .feature-grid {
        grid-template-columns: 1fr;
    }

    .blog-detail-container {
        padding: 20px;
    }

    .btn[onclick="openConsultationDialog()"] {
        width: 100%;
        margin-left: 0;
    }

    .pagination {
        gap: 4px;
    }

    .page-btn {
        min-width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
}

@media (min-width: 768px) {
    .feature-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* モバイル用フローティングボタン */
.mobile-create-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    display: none;
}

.create-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background-color: #2563EB;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
    transition: all 0.3s ease;
}

.create-btn svg {
    width: 24px;
    height: 24px;
    fill: white;
}

.create-btn:hover {
    background-color: #1D4ED8;
    transform: scale(1.1);
}

/* モバイル表示時のみ表示 */
@media screen and (max-width: 767px) {
    .mobile-create-btn {
        display: block;
    }
}
