@charset "UTF-8";

/*!
Theme Name: Cocoon Child
Description: Cocoon専用の子テーマ
Theme URI: https://wp-cocoon.com/
Author: わいひら
Author URI: https://nelog.jp/
Template:   cocoon-master
Version:    1.1.3
*/

/************************************
** 子テーマ用のスタイルを書く
************************************/
/*必要ならばここにコードを書く*/

/************************************
** レスポンシブデザイン用のメディアクエリ
************************************/
/*1023px以下*/
@media screen and (max-width: 1023px){
  /*必要ならばここにコードを書く*/
}

/*834px以下*/
@media screen and (max-width: 834px){
  /*必要ならばここにコードを書く*/
}

/*480px以下*/
@media screen and (max-width: 480px){
  /*必要ならばここにコードを書く*/
}
/**
 * スマートニュース風スタイル
 * 
 * このファイルをWordPressテーマのstyle.cssに追加してください
 */

/* カテゴリタブ */
.category-tabs {
    display: flex;
    overflow-x: auto;
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 0 15px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.category-tabs .tab-item {
    padding: 15px 20px;
    text-decoration: none;
    color: #666;
    font-weight: 500;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.category-tabs .tab-item:hover {
    color: #333;
    background: #f5f5f5;
}

.category-tabs .tab-item.active {
    color: #2196F3;
    border-bottom-color: #2196F3;
}

/* 記事一覧 */
.article-list {
    max-width: 800px;
    margin: 0 auto;
    padding: 0;
}

/* 記事カード */
.article-card {
    display: flex;
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
    background: #fff;
    transition: background 0.2s;
}

.article-card:hover {
    background: #f9f9f9;
}

.article-card:first-child {
    flex-direction: column;
    padding: 0;
    margin-bottom: 10px;
}

.article-card:first-child .article-thumbnail {
    width: 100%;
    height: 250px;
    margin: 0;
}

.article-card:first-child .article-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

.article-card:first-child .article-content {
    padding: 15px;
}

.article-card:first-child .article-title {
    font-size: 22px;
    margin-bottom: 10px;
}

/* 記事サムネイル */
.article-thumbnail {
    width: 120px;
    height: 90px;
    flex-shrink: 0;
    margin-right: 15px;
}

.article-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

/* 記事コンテンツ */
.article-content {
    flex: 1;
    min-width: 0;
}

.article-title {
    font-size: 16px;
    font-weight: bold;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.article-title a {
    color: #333;
    text-decoration: none;
}

.article-title a:hover {
    color: #2196F3;
}

.article-excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-meta {
    font-size: 12px;
    color: #999;
}

.article-meta .separator {
    margin: 0 5px;
}

.article-meta .category {
    font-weight: 500;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .category-tabs {
        padding: 0 10px;
    }
    
    .category-tabs .tab-item {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .article-card {
        padding: 12px;
    }
    
    .article-thumbnail {
        width: 100px;
        height: 75px;
        margin-right: 12px;
    }
    
    .article-title {
        font-size: 15px;
    }
    
    .article-excerpt {
        font-size: 13px;
    }
}

/* ローディングアニメーション */
.loading {
    text-align: center;
    padding: 20px;
    color: #999;
}

.loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* トップページ専用スタイル */
.home .article-list {
    padding-top: 10px;
}

/* カテゴリページ専用スタイル */
.category .page-header {
    background: #f5f5f5;
    padding: 20px;
    margin-bottom: 20px;
    border-left: 4px solid #2196F3;
}

.category .page-header h1 {
    margin: 0;
    font-size: 24px;
    color: #333;
}

/* 無限スクロール用 */
.infinite-scroll-request {
    text-align: center;
    padding: 20px;
}

.infinite-scroll-last {
    text-align: center;
    padding: 20px;
    color: #999;
    font-size: 14px;
}