/* ========================================
   BLOG STYLES - ブログ専用スタイル
   ======================================== */

/* ブログページでは、ハンバーガーメニューのスタイルは
   main.css と responsive.css のものを使用するため、
   ここでは独自のスタイルを定義しない */

/* Dynamic Type Support - iPhone自動テキストサイズ変更対応 */
.blog-section,
.blog-content,
.blog-list,
.blog-item,
.article-detail,
.news-section,
.news-content,
.news-list,
.news-item {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* フォントサイズを固定 */
.blog-item-title,
.blog-item-excerpt,
.article-title,
.article-body,
.news-item-title,
.news-item-description {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* ブログセクション */
.blog-section {
    padding: 60px 0;
    background: #f8f9fa;
}

/* カテゴリタブ */
.category-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 10px;
}

.category-tab {
    padding: 12px 24px;
    background: white;
    border: 2px solid #d4a574;
    border-radius: 25px;
    color: #d4a574;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-block;
}

.category-tab:hover {
    background: #d4a574;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 165, 116, 0.3);
}

.category-tab.active {
    background: #d4a574;
    color: white;
    box-shadow: 0 4px 12px rgba(212, 165, 116, 0.3);
}



/* タグ検索結果表示 */
.tag-search-result {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
    margin-bottom: 30px;
}

.search-result-header h3 {
    color: #333;
    margin: 0 0 8px 0;
    font-size: 22px;
    font-weight: 600;
}

.search-result-header p {
    color: #666;
    margin: 0 0 20px 0;
    font-size: 16px;
}

.search-result-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.clear-tag-filter-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.clear-tag-filter-btn:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.back-to-all-btn {
    background: #d4a574;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.back-to-all-btn:hover {
    background: #c1965a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 165, 116, 0.3);
}

.clear-tag-filter-btn i,
.back-to-all-btn i {
    font-size: 16px;
}

/* タグスタイル */
.blog-item-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

.blog-tag {
    background: #f8f9fa;
    color: #666;
    padding: 4px 8px;
    border-radius: 15px;
    font-size: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid #e9ecef;
}

.blog-tag:hover {
    background: #d4a574;
    color: white;
    transform: translateY(-1px);
}

.article-tags {
    padding: 20px 30px;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
}

.article-tags h4 {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.article-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.blog-content {
    max-width: 1200px;
    margin: 0 auto;
}

/* 記事一覧のグリッドレイアウト */
.blog-list {
    display: grid;
    gap: 30px;
    grid-template-columns: 1fr;
}

/* タブレット（768px以上）で2列 */
@media (min-width: 768px) {
    .blog-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
}

/* PC（1024px以上）で3列 */
@media (min-width: 1024px) {
    .blog-list {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }
}

/* レスポンシブ対応 */
@media (max-width: 767px) {
    .category-tabs {
        gap: 8px;
    }
    
    .category-tab {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .blog-content {
        padding: 0 15px;
    }
}

/* ブログ記事一覧の追加スタイル */
.blog-list {
    margin-bottom: 40px;
}

.blog-item {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

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

.blog-item-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-item-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
}

.blog-item-category {
    background: #d4a574;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.blog-item-date {
    display: flex;
    align-items: center;
    gap: 5px;
}

.blog-item-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.4;
}

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

.blog-item-title a:hover {
    color: #d4a574;
}

.blog-item-excerpt {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}


.blog-item-read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #d4a574;
    text-decoration: none;
    font-weight: 500;
    margin-top: auto;
    padding-top: 15px;
    transition: all 0.3s ease;
}

.blog-item-read-more:hover {
    color: #c1965f;
    transform: translateX(5px);
}

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

.pagination-btn {
    padding: 10px 15px;
    border: 1px solid #ddd;
    background: white;
    color: #333;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.pagination-btn:hover {
    background: #d4a574;
    color: white;
    border-color: #d4a574;
}

.pagination-btn.active {
    background: #d4a574;
    color: white;
    border-color: #d4a574;
}

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

/* 記事詳細ページ */
.article-section {
    padding: 60px 0;
    background: #f8f9fa;
}

.article-content {
    max-width: 800px;
    margin: 0 auto;
}

.back-to-list {
    margin-bottom: 30px;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #666;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.back-button:hover {
    color: #d4a574;
    transform: translateX(-5px);
}

.article-detail {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 40px;
}

.article-header {
    padding: 30px 30px 20px;
    border-bottom: 1px solid #e9ecef;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #666;
}

.article-category {
    background: #d4a574;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.article-title {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    line-height: 1.3;
    margin-bottom: 15px;
}

.article-body {
    padding: 30px;
}

.article-inline-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin: 20px 0;
    display: block;
}

.article-body h2 {
    font-size: 22px;
    font-weight: 600;
    color: #333;
    margin: 30px 0 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #d4a574;
}

.article-body h3 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 25px 0 10px;
}

.article-body p {
    color: #666;
    line-height: 1.8;
    margin-bottom: 20px;
}

.article-body ul,
.article-body ol {
    color: #666;
    line-height: 1.8;
    margin-bottom: 20px;
    padding-left: 20px;
}

.article-body li {
    margin-bottom: 8px;
}

.article-body strong {
    color: #333;
    font-weight: 600;
}

.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px auto;
    display: block;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.article-body img:hover {
    transform: scale(1.02);
}

/* アイキャッチ画像のスタイル */
.blog-item-image {
    width: 100%;
    height: 200px;
    object-fit: contain;
    object-position: center;
    border-radius: 8px;
    margin-bottom: 15px;
    transition: transform 0.3s ease;
    background: #f8f9fa;
}

.blog-item-image:hover {
    transform: scale(1.02);
}

/* 画像読み込みエラー時のフォールバック */
.blog-item-image:not([src]),
.blog-item-image[src=""],
.blog-item-image[src*="undefined"] {
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
    font-family: 'Noto Sans JP', sans-serif;
}

.blog-item-image:not([src])::before,
.blog-item-image[src=""]::before,
.blog-item-image[src*="undefined"]::before {
    content: "画像なし";
}

.article-featured-image {
    width: 100%;
    height: 300px;
    object-fit: contain;
    object-position: center;
    border-radius: 8px;
    margin-bottom: 20px;
    background: #f8f9fa;
}

/* 記事内のアイキャッチ画像を非表示 */
.article-featured-image {
    display: none;
}

.article-main-image {
    margin-bottom: 20px;
}

.related-item-image {
    width: 100%;
    height: 150px;
    object-fit: contain;
    object-position: center;
    border-radius: 8px;
    margin-bottom: 10px;
    background: #f8f9fa;
}


/* 関連記事 */
.related-articles {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    padding: 30px;
}

.related-articles h3 {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #d4a574;
}

.related-list {
    display: grid;
    gap: 20px;
}

.related-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.related-item:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.related-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 5px;
}

.related-item-content {
    flex: 1;
}

.related-item-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.4;
}

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

.related-item-title a:hover {
    color: #d4a574;
}

.related-item-meta {
    font-size: 12px;
    color: #666;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .blog-section,
    .article-section {
        padding: 40px 0;
    }
    
    .blog-content,
    .article-content {
        padding: 0 20px;
    }
    
    .blog-item-image {
        height: 180px;
        object-fit: contain;
        object-position: center;
        background: #f8f9fa;
    }
    
    .blog-item-content {
        padding: 20px;
    }
    
    .blog-item-title {
        font-size: 18px;
    }
    
    
    .article-header,
    .article-body {
        padding: 20px;
    }
    
    /* スマホでのタグ検索結果ボタンレイアウト */
    .search-result-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .clear-tag-filter-btn,
    .back-to-all-btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    
    .article-title {
        font-size: 24px;
    }
    
    .related-item {
        flex-direction: column;
    }
    
    .related-item-image {
        width: 100%;
        height: 120px;
    }
    
    /* アイキャッチ画像のレスポンシブ対応 */
    .blog-item-image {
        height: 180px;
        object-fit: contain;
        object-position: center;
        background: #f8f9fa;
    }
    
    .article-featured-image {
        height: 220px;
        object-fit: contain;
        object-position: center;
        background: #f8f9fa;
    }
    
    .pagination {
        flex-wrap: wrap;
    }
    
    .pagination-btn {
        padding: 8px 12px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .blog-item-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .article-title {
        font-size: 20px;
    }
    
    /* 小さなスマホ画面でのアイキャッチ画像調整 */
    .blog-item-image {
        height: 160px;
        object-fit: contain;
        object-position: center;
        background: #f8f9fa;
    }
    
    .article-featured-image {
        height: 180px;
        object-fit: contain;
        object-position: center;
        background: #f8f9fa;
    }
    
    .blog-item-content {
        padding: 15px;
    }
    
    .blog-item-title {
        font-size: 16px;
        line-height: 1.4;
    }
}

