/* ==============================================
   CLAN Blog Index Styles - Revamped
   ============================================== */

/* テーマ変数は blog/components.css で定義されています */

body.myblog-body {
    background-color: var(--theme-bg);
    color: var(--theme-text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

/* ページタイトル */
.myblog-content-box {
    text-align: center;
    margin-bottom: 40px;
}

[data-theme="dark"] .myblog-page-title {
    background: linear-gradient(135deg, #f1f5f9 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

.myblog-page-title {
    font-family: 'Outfit', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 15px;
}

.myblog-page-description {
    font-size: 1.1rem;
    color: var(--theme-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* 検索ボックス */
.myblog-search-box {
    margin: 30px 0;
    display: flex;
    justify-content: center;
}

.search-input-wrapper {
    position: relative;
    width: 100%;
    max-width: 600px;
    backdrop-filter: blur(10px);
    background: var(--theme-glass-bg);
    border-radius: 50px;
    padding: 5px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--theme-glass-border);
}

#blog-search-input {
    width: 100%;
    padding: 15px 25px 15px 55px;
    border-radius: 50px;
    border: none;
    background: transparent;
    outline: none;
    font-size: 16px;
    color: var(--theme-text);
    transition: all 0.3s;
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--theme-muted);
    pointer-events: none;
}

/* カテゴリフィルター */
.myblog-category-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
    padding: 10px;
}

.myblog-filter-btn {
    padding: 10px 20px;
    border-radius: 30px;
    background: #fff;
    border: 1px solid #e2e8f0;
    color: var(--theme-muted);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.myblog-filter-btn:hover {
    border-color: var(--blog-brand-primary);
    color: var(--blog-brand-primary);
    transform: translateY(-2px);
}

.myblog-filter-btn.active {
    background: var(--blog-brand-primary);
    border-color: var(--blog-brand-primary);
    color: #fff;
    box-shadow: 0 10px 15px -3px rgba(200, 168, 130, 0.3);
}

/* メインレイアウト */
.blog-main-layout {
    display: flex;
    gap: 30px;
}

.blog-content-area {
    flex: 1;
}

/* 記事グリッド */
.myblog-articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

/* 記事カード */
.myblog-article-card {
    background: var(--theme-card);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.myblog-article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.myblog-article-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.myblog-article-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.myblog-article-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.myblog-article-card:hover .myblog-article-link img {
    transform: scale(1.05);
}

.myblog-article-card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.myblog-article-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.myblog-article-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.myblog-article-category {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    background: #f1f5f9;
    color: var(--accent-color);
    text-transform: uppercase;
}

.myblog-article-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* カテゴリ別テーマカラー */
.myblog-article-card[data-category="Gemini"] .myblog-article-category {
    background: #fee2e2;
    color: #ef4444;
}

.myblog-article-card[data-category="UTAGE"] .myblog-article-category {
    background: #ccfbf1;
    color: #0d9488;
}

.myblog-article-card[data-category="AI"] .myblog-article-category {
    background: #ede9fe;
    color: #8b5cf6;
}

.myblog-article-card[data-category="マーケティング"] .myblog-article-category {
    background: #ffedd5;
    color: #f59e0b;
}

.myblog-article-card[data-category="ChatGPT"] .myblog-article-category {
    background: #dcfce7;
    color: #10a37f;
}

.myblog-article-card[data-category="Claude"] .myblog-article-category {
    background: #ffebd3;
    color: #d97757;
}

/* サイドバー */
.blog-sidebar {
    width: 280px;
    flex-shrink: 0;
}

.sidebar-widget {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 25px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid #f1f5f9;
}

.cta-widget {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: #fff;
    text-align: center;
}

.cta-widget.accent {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.cta-widget.danger {
    background: linear-gradient(135deg, #ef4444 0%, #991b1b 100%);
}

.widget-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.widget-text {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 20px;
    opacity: 0.9;
}

.widget-btn {
    display: inline-block;
    padding: 12px 24px;
    background: #fff;
    color: #1e293b;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.widget-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
}

/* ページネーション */
.myblog-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 60px 0;
    gap: 15px;
    flex-wrap: wrap;
}

.myblog-pagination-info {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-right: 20px;
}

.myblog-pagination-buttons {
    display: flex;
    gap: 8px;
}

.myblog-pagination-page,
.myblog-pagination-prev,
.myblog-pagination-next {
    padding: 10px 18px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    color: var(--text-main);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.myblog-pagination-page:hover:not(.myblog-pagination-current),
.myblog-pagination-prev:hover,
.myblog-pagination-next:hover {
    background: #f8fafc;
    border-color: var(--blog-brand-primary);
    color: var(--blog-brand-primary);
}

.myblog-pagination-current {
    background: var(--blog-brand-primary);
    color: #fff;
    border-color: var(--blog-brand-primary);
}

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

/* ローディング & メッセージ */
.myblog-loading,
.no-articles {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: var(--theme-muted);
    font-size: 1.1rem;
}

/* テーマ切替ボタンは blog/components.css で定義 */

/* ダークモード時のカテゴリバッジ調整 */
[data-theme="dark"] .myblog-article-category {
    opacity: 0.9;
}

[data-theme="dark"] #blog-search-input {
    background: var(--theme-input-bg);
    color: var(--theme-text);
}

[data-theme="dark"] #blog-search-input::placeholder {
    color: #64748b;
}

/* レスポンシブ */
@media (max-width: 1024px) {
    .blog-sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    .myblog-page-title {
        font-size: 2rem;
    }

    .myblog-articles-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .myblog-container {
        padding: 30px 15px;
    }

    .myblog-articles-grid {
        grid-template-columns: 1fr;
    }

    .myblog-pagination-info {
        width: 100%;
        text-align: center;
        margin-right: 0;
        margin-bottom: 15px;
    }
}

/* 検索ハイライト */
.search-highlight {
    background: rgba(200, 168, 130, 0.2);
    color: #b45309;
    padding: 0 2px;
    border-radius: 2px;
    font-weight: 600;
}

[data-theme="dark"] .search-highlight {
    background: rgba(200, 168, 130, 0.4);
    color: #fbbf24;
}