/* themes/sidebar-theme/style.css - サイドバーテーマのスタイル */

/* ============================================
   基本レイアウト
   ============================================ */
   body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #f8f9fa;
}

main {
    flex: 1;
}

/* ============================================
   ナビゲーション
   ============================================ */
.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

.site-description {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* ヘッダーメニュー */
.header-menu {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.header-menu .nav-link {
    color: white;
    padding: 0.75rem 1rem;
    transition: all 0.3s;
}

.header-menu .nav-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.2);
}

/* ============================================
   記事カード
   ============================================ */
.post-card {
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: hidden;
}

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

.post-card a {
    pointer-events: auto;
    cursor: pointer;
}

.post-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.post-detail-thumbnail {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.post-meta {
    color: #6c757d;
    font-size: 0.9rem;
}

/* ============================================
   記事コンテンツ
   ============================================ */
.post-content img,
.page-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
}

.post-content h2,
.post-content h3,
.post-content h4,
.page-content h2,
.page-content h3,
.page-content h4 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.post-content blockquote {
    border-left: 4px solid #667eea;
    padding-left: 1rem;
    margin: 1.5rem 0;
    color: #6c757d;
    font-style: italic;
}

.post-content code {
    background-color: #f8f9fa;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.9em;
}

.post-content pre {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 5px;
    overflow-x: auto;
}

/* ============================================
   サイドバー
   ============================================ */

/* サイドバーウィジェット */
.sidebar-widget {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.sidebar-widget-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #667eea;
    color: #333;
}

/* カテゴリーリスト */
.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li {
    margin-bottom: 0.5rem;
}

.category-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s;
}

.category-list a:hover {
    background-color: #f8f9fa;
    color: #667eea;
}

/* タグクラウド */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-item {
    display: inline-block;
    padding: 0.3rem 0.75rem;
    background-color: #f8f9fa;
    color: #333;
    text-decoration: none;
    border-radius: 20px;
    transition: all 0.3s;
    font-size: 0.9rem;
}

.tag-item:hover {
    background-color: #667eea;
    color: white;
    transform: translateY(-2px);
}

/* 最近の投稿リスト */
.recent-posts-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.recent-post-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.recent-post-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.recent-post-thumbnail {
    flex-shrink: 0;
    width: 80px;
    height: 60px;
    overflow: hidden;
    border-radius: 4px;
}

.recent-post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.recent-post-thumbnail:hover img {
    transform: scale(1.1);
}

.recent-post-content {
    flex: 1;
    min-width: 0;
}

.recent-post-content h4 {
    font-size: 0.9rem;
    margin: 0 0 0.25rem 0;
    line-height: 1.4;
}

.recent-post-content h4 a {
    color: #333;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recent-post-content h4 a:hover {
    color: #667eea;
}

.recent-post-content small {
    font-size: 0.75rem;
}

/* アーカイブリスト */
.archive-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.archive-list li {
    margin-bottom: 0.5rem;
}

.archive-list a {
    display: flex;
    justify-content: between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    color: #333;
    text-decoration: none;
    background-color: #f8f9fa;
    border-radius: 4px;
    transition: all 0.3s;
}

.archive-list a:hover {
    background-color: #e9ecef;
    color: #667eea;
    transform: translateX(3px);
}

/* ============================================
   PR表示
   ============================================ */
.pr-notice {
    background: #f8f9fa;
    border-left: 3px solid #6c757d;
    padding: 0.5rem 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    color: #6c757d;
}

/* ============================================
   フッター
   ============================================ */
footer {
    background-color: #343a40;
    color: white;
    margin-top: 3rem;
}

.footer-menu {
    margin-bottom: 1rem;
}

.footer-menu a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    padding: 0.25rem 0.75rem;
    display: inline-block;
    transition: color 0.3s;
}

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

/* ============================================
   トップスクロールボタン
   ============================================ */
#scrollTopBtn {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 99;
    border: none;
    outline: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    cursor: pointer;
    padding: 15px;
    border-radius: 50%;
    font-size: 20px;
    width: 50px;
    height: 50px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: all 0.3s;
}

#scrollTopBtn:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.4);
}

/* ============================================
   関連記事
   ============================================ */
.related-posts {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.related-posts-title {
    font-size: 1.3rem;
    font-weight: bold;
    color: #333;
    border-bottom: 3px solid #667eea;
    padding-bottom: 0.5rem;
}

.related-posts-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.related-post-item {
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 1.5rem;
}

.related-post-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.related-post-link {
    display: flex;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s;
}

.related-post-link:hover {
    transform: translateX(5px);
}

.related-post-thumbnail {
    flex-shrink: 0;
    width: 120px;
    height: 90px;
    border-radius: 6px;
    overflow: hidden;
    background: #f8f9fa;
}

.related-post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.related-post-link:hover .related-post-thumbnail img {
    transform: scale(1.1);
}

.related-post-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #adb5bd;
    font-size: 2rem;
}

.related-post-content {
    flex: 1;
    min-width: 0;
}

.related-post-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-post-link:hover .related-post-title {
    color: #667eea;
}

.related-post-meta {
    margin-bottom: 0.5rem;
}

.related-post-excerpt {
    font-size: 0.875rem;
    color: #6c757d;
    margin: 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 576px) {
    .related-post-thumbnail {
        width: 100px;
        height: 75px;
    }
    
    .related-post-title {
        font-size: 0.9rem;
    }
    
    .related-post-excerpt {
        font-size: 0.8rem;
    }
}

/* ============================================
   レスポンシブ対応
   ============================================ */
@media (max-width: 991px) {
    .sidebar {
        position: static;
        max-height: none;
        margin-top: 2rem;
    }
}

@media (max-width: 768px) {
    .footer-menu {
        text-align: center;
    }
    
    .footer-menu a {
        display: block;
        padding: 0.5rem 0;
    }
    
    .recent-post-thumbnail {
        width: 60px;
        height: 45px;
    }
}

/* ============================================
   Amazon商品検索（元のスタイルを維持）
   ============================================ */
.amazon-search-title {
    display: none;
}

.search-form {
    max-width: 100%;
    margin: 0 0 30px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.search-input {
    flex: 1;
    min-width: 200px;
    padding: 10px 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
}

.search-category {
    padding: 10px 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
    background-color: white;
}

.search-button {
    padding: 10px 20px;
    background-color: #f0c14b;
    border: 1px solid #a88734;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.search-button:hover {
    background-color: #f7ca69;
}

.message {
    max-width: 100%;
    margin: 0 0 20px 0;
    padding: 12px 15px;
    border-radius: 4px;
}

.message.info {
    background-color: #f3f8ff;
    border: 1px solid #b3d7ff;
    color: #004085;
}

.message.error {
    background-color: #ffeeee;
    border: 1px solid #ffbbbb;
    color: #d8000c;
}

.message.warning {
    background-color: #fff8e1;
    border-left: 4px solid #ffc107;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

#results {
    max-width: 100%;
    margin: 0 auto;
}

.amazon-products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 0;
    list-style: none;
    margin: 2rem 0;
}

.amazon-products li {
    background: white;
    border-radius: 4px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.amazon-products li:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.amazon-products img {
    display: block;
    width: 100%;
    height: 200px;
    object-fit: contain;
    margin: 0 auto 15px;
}

.amazon-products h4 {
    margin: 0 0 10px;
    font-size: 15px;
    line-height: 1.4;
    height: 84px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    flex-shrink: 0;
}

.amazon-products h4 a {
    color: #333;
    text-decoration: none;
}

.amazon-products h4 a:hover {
    color: #667eea;
    text-decoration: underline;
}

.amazon-products .price {
    display: block;
    margin: 0 0 10px;
    font-weight: bold;
    color: #B12704;
    font-size: 16px;
    flex-shrink: 0;
}

.amazon-products .description {
    margin: 0;
    font-size: 13px;
    color: #555;
    line-height: 1.4;
    height: 52px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    flex-shrink: 0;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin: 30px 0 10px;
    gap: 8px;
}

.page-link {
    display: inline-block;
    padding: 8px 12px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.2s, border-color 0.2s;
}

.page-link:hover {
    background-color: #f5f5f5;
    border-color: #aaa;
}

.page-link.current {
    background-color: #f0c14b;
    border-color: #a88734;
    color: #333;
    font-weight: bold;
}

.page-link.disabled {
    color: #aaa;
    cursor: not-allowed;
    background-color: #f9f9f9;
}

/* ============================================
   関連記事 - フッター上部全幅表示
   ============================================ */
   .related-posts-footer {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 3rem 0;
    margin-top: 7rem;
    border-top: 3px solid #667eea;
}

.related-posts-footer-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 1rem;
}

.related-posts-footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.related-posts-footer-title i {
    color: #667eea;
    margin-right: 0.5rem;
}

.related-card {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    display: block;
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.2);
}

.related-thumb {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.related-thumb-placeholder {
    width: 100%;
    height: 150px;
}

.related-thumb-placeholder i {
    font-size: 3rem;
    opacity: 0.5;
}

.related-title {
    font-size: 0.9rem;
    line-height: 1.4;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 4.2em;
    padding: 0.5rem;
}

/* タブレット */
@media (max-width: 991px) {
    .related-posts-footer {
        padding: 2.5rem 0;
    }
    
    .related-thumb {
        height: 130px;
    }
    
    .related-thumb-placeholder {
        height: 130px;
    }
}

/* スマホ */
@media (max-width: 767px) {
    .related-posts-footer {
        padding: 2rem 0;
    }
    
    .related-posts-footer-title {
        font-size: 1.3rem;
        margin-bottom: 1.5rem;
    }
    
    .related-thumb {
        height: 120px;
    }
    
    .related-thumb-placeholder {
        height: 120px;
    }
    
    .related-thumb-placeholder i {
        font-size: 2.5rem;
    }
    
    .related-title {
        font-size: 0.85rem;
        min-height: 3.6em;
        -webkit-line-clamp: 2;
    }
}
/* ============================================
   SNSシェアボタン
   ============================================ */
.sns-share-buttons {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 8px;
    padding: 1.5rem;
}

.sns-share-buttons h5 {
    color: #333;
    font-weight: bold;
    margin-bottom: 1rem;
}

.sns-share-buttons h5 i {
    color: #667eea;
}

.sns-share-buttons .btn {
    font-weight: 500;
    padding: 0.4rem 0.8rem;
    transition: all 0.3s;
    white-space: nowrap;
    font-size: 0.9rem;
}

.sns-share-buttons .btn i {
    margin-right: 0.25rem;
}

/* Twitter/X ボタン */
.sns-share-buttons .btn-outline-dark:hover {
    background-color: #000;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Facebook ボタン */
.sns-share-buttons .btn-outline-primary:hover {
    background-color: #1877f2;
    color: white;
    border-color: #1877f2;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(24, 119, 242, 0.3);
}

/* LINE ボタン */
.sns-share-buttons .btn-outline-success:hover {
    background-color: #00b900;
    color: white;
    border-color: #00b900;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 185, 0, 0.3);
}

/* はてなブックマーク ボタン */
.sns-share-buttons .btn-outline-info:hover {
    background-color: #00a4de;
    color: white;
    border-color: #00a4de;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 164, 222, 0.3);
}

/* Pocket ボタン */
.sns-share-buttons .btn-outline-danger:hover {
    background-color: #ef3f56;
    color: white;
    border-color: #ef3f56;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(239, 63, 86, 0.3);
}

/* URLコピー ボタン */
.sns-share-buttons .btn-outline-secondary:hover {
    background-color: #6c757d;
    color: white;
    border-color: #6c757d;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}

/* スマホ対応 */
@media (max-width: 767px) {
    .sns-share-buttons {
        padding: 1rem;
    }
    
    .sns-share-buttons h5 {
        font-size: 1rem;
    }
    
    .sns-share-buttons .d-flex {
        flex-direction: column;
    }
    
    .sns-share-buttons .btn {
        width: 100%;
        justify-content: center;
        margin-bottom: 0.5rem;
    }
}