:root {
    --primary-color: #ff4757;
    --text-color: #2f3542;
    --bg-color: #f1f2f6;
    --border-color: #ced6e0;
}

/* 記事カードのコンテナ */
#main .news-container {
    width: 100%;
    max-width: 100%px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-height: 120px; /* ページ切り替え時のガタつき防止 */
}

/* 訴求力を高めるカードデザイン */
#main .news-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    text-decoration: none;
    color: var(--text-color);
    display: flex;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#main .news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.12);
}

#main .card-img-wrapper {
    width: 15%;
    position: relative;
    /*overflow: hidden;*/

}
#main .card-img-wrapper p{

  font-size: 0.9rem;  
  position: absolute; /* 親要素を基準に絶対配置 */
  
  /* --- 配置の指定（例：左上から20px） --- */

  transform: skew(10deg, 15deg);
  /* --- 文字の見栄え（背景に応じて調整） --- */
  margin: 0;
  color: white; 
  font-weight: bold;
  text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.9); /* 視認性を上げる影 */
  white-space: nowrap;
}

#main .card-img-wrapper .keyword1{
  top: 10%;
  left: 20%;
}
#main .card-img-wrapper .keyword2{
  top: 40%;
  left: 5%;
}
#main .card-img-wrapper .keyword3{
  top: 70%;
  left: 30%;
}


#main .card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

#main .news-card:hover .card-img {
    transform: scale(1.05);
}

#main .card-content {
    width: 85%;
    padding: 20px;
    display: flex;
    flex-direction: column;
    /*justify-content: space-between;*/
}

#main .badge {
    /*display: inline-block;*/
    /*align-self: flex-start;*/
    display: absolute;

    background: var(--primary-color);
    color: #ffffff;
    font-size: 11px;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 4px;
    margin-bottom: 10px;
}
#main .badge.trend { background: #3742fa; }
#main .badge.pickup { background: #ffa502; }

#main h2.card-title::first-letter {
    all: unset; /* 完全リセット（最も確実） */
}

#main .card-title {
    font-size: 17px ;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 10px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

#main .card-lead {
    font-size: 14px ;
    margin: 0 0 10px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

#main .card-meta {
    font-size: 12px;
    color: #a4b0be;
    display: flex;
    gap: 15px;
}



/* --- ページネーションのCSS --- */
#main .pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 30px;
}

#main .page-btn {
    background: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 8px 14px;
    font-size: 14px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

#main .page-btn:hover:not(:disabled) {
    background: var(--text-color);
    color: #ffffff;
    border-color: var(--text-color);
}

/* アクティブ（現在）のページボタン */
#main .page-btn.active {
    background: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
    cursor: default;
}

/* 前へ・次へボタンが無効な時 */
#main .page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}