.contents_list{
  width: 100%;
}

.contents_list h1{
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    margin: 40px auto 85px;
}

.contents_list .filter{
  width: 100%;
  background-color: #FDF5E8;
    margin-bottom: 41px;
    padding: 15px 0;
}
.contents_list .filter ul{
  max-width: 1200px;
  margin: auto !important;
}


.article {
    opacity: 1;
    transform: translateY(0);
}

.article.fade-in {
    opacity: 1;
    transform: translateY(0);
}

.load-more-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    background-color: #FF9100 !important;
    color: white !important;
    font-size: 12px !important;
    width: 360px;
    height: 40px !important;
    padding: 0 !important;
    border: none !important;
     border-radius: 900px;
    cursor: pointer !important;
    margin-top: 3px;
    letter-spacing: 1.6px;
  
}

.load-more-btn:hover {
    background-color: #ffad33 !important;
}

.load-more-btn:active {
    transform: translateY(0);
}

.load-more-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.load-more-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* スケルトンローディング */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* スケルトン基本設定 */
.skeleton-image {
    width: 100%;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.skeleton-text {
    border-radius: 4px;
    margin: 8px 0;
}

.skeleton-text.title {
    width: 85%;
}

.skeleton-text.category {
    width: 60px;
    border-radius: 12px;
}

.skeleton-text.date {
    width: 80px;
}

.article-skeleton {
    opacity: 1;
    transform: translateY(0);
}

.article img {
    transition: opacity 0.3s ease;
}

.article img.loading {
    opacity: 0;
}

.article img.loaded {
    opacity: 1;
    margin-bottom: 10px;
}

.day{
    font-size: 10px;
    color: #9B9B9B;
    font-weight: 600;
}

/* レイアウト分岐 */
.article-list {
    width: 1200px;
    margin: 0 auto;
}

/* 大きなレイアウト（1-4件目）- 横幅590px */
.large-section {
    display: grid;
    grid-template-columns: 590px 590px;
    gap: 27px 21px;
    margin-bottom: 30px;
}

.article.large-layout {
    width: 590px;
}

/* 大きなレイアウトのスケルトンサイズ */
.article.large-layout .skeleton-image {
    height: 295px; /* 590px * (540/1080) = 295px */
}

.article.large-layout .skeleton-text.title {
    height: 24px;
    margin: 12px 0 8px 0;
}

.article.large-layout .skeleton-text.category {
    height: 16px;
    margin: 8px 0;
}

.article.large-layout .skeleton-text.date {
    height: 14px;
    margin: 6px 0 0 0;
}

.article-list.large-grid {
    display: grid;
    grid-template-columns: 590px 590px;
    gap: 20px;
}

/* 小さなレイアウト（5件目以降）- 横幅285px */
.small-section {
    display: grid;
    grid-template-columns: 285px 285px 285px 285px;
    gap: 27px 20px;
}

.large-section .title{
        margin-bottom: 8px;
        font-weight: bold;
}

.large-section .cat{
    margin-bottom: 3px;
    font-weight: bold;
    font-size: 12px;
}

.title{
    margin-bottom: 9px;
}

.small-section .cat{
    margin-top: 12px;
}

.article.small-layout {
    width: 285px;
}

.article.small-layout img {
    aspect-ratio: 1;
    object-fit: cover;
}

.article.small-layout .title {
    font-size: 14px;
    line-height: 1.45;
      font-weight: bold;
}

.article.small-layout .cat {
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 4px;
}

.article.small-layout .day {
    font-size: 11px;
}

/* 小さなレイアウトのスケルトンサイズ */
.article.small-layout .skeleton-image {
    height: 285px; /* 正方形 */
    aspect-ratio: 1;
}

.article.small-layout .skeleton-text.title {
    height: 18px; /* 2行分を想定 */
    margin: 8px 0 6px 0;
}

.article.small-layout .skeleton-text.category {
    height: 14px;
    margin: 6px 0;
}

.article.small-layout .skeleton-text.date {
    height: 12px;
    margin: 4px 0 0 0;
}

/* レスポンシブ対応 */
@media (max-width: 1240px) {
    .article-list {
        width: 100%;
        padding: 0 20px;
    }
    
    .large-section {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
    
    .article.large-layout {
        width: 100%;
    }
    
    .article-list.large-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .small-section {
        grid-template-columns: 1fr 1fr 1fr 1fr;
        gap: 20px;
    }
    
    .article.small-layout {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .large-section {
        grid-template-columns: 1fr;
    }
    
    .article-list.large-grid {
        grid-template-columns: 1fr;
    }
    
    .small-section {
        grid-template-columns: 1fr 1fr;
    }
    
    /* スマホ用スケルトンサイズ調整 */
    .article.large-layout .skeleton-image {
        height: calc((100vw - 40px) * 0.5); /* 画面幅に応じた高さ */
        max-height: 200px;
    }
    
    .article.small-layout .skeleton-image {
        height: calc((100vw - 60px) / 2); /* 2列グリッド用 */
        aspect-ratio: 1;
        max-height: 180px;
    }
}

@media (max-width: 480px) {
    .contents_list h1 {
        font-size: 20px;
        margin: 30px auto 44px auto;
    }
    
    /* 小画面用スケルトンサイズ調整 */
    .article.large-layout .skeleton-image,
    .article.small-layout .skeleton-image {
        height: calc((100vw - 40px) * 0.5); /* 1列表示用 */
        max-height: 180px;
    }
    
    .contents_wrap {
        padding: 0 15px;
    }
    
    .contents_list .filter {
        margin-left: -15px;
        margin-right: -15px;
        width: calc(100% + 30px);
    }
    
    .contents_list .filter ul {
        padding: 0 15px;
        overflow-x: auto;
        white-space: nowrap;
        flex-wrap: nowrap;
    }
    
    .contents_list .filter ul::-webkit-scrollbar {
        display: none;
    }
    
    .contents_list .filter ul {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
    
    .article-list {
        padding: 0 !important;
    }
    
    .small-section {
        grid-template-columns: 1fr 1fr;
    }
    
    .article img {
        width: 100% !important;
        height: auto !important;
    }
    
    .load-more-btn {
        width: 100% !important;
    }
}

/* フィルタスタイリング */
.filter ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter ul li {
    padding: 6px 16px 5px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: opacity 0.3s ease;
    background-color: #fff;
    color: #333;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    display: inline-block;
    min-width: fit-content;
}

.filter ul li:hover {
    opacity: 0.7;
}

.filter ul li.active {
    background-color: #FF9100;
    color: white;
    padding: 6px 16px 5px 16px;
}

.filter ul li.active:hover {
    opacity: 0.9;
}

/* カテゴリーに#を追加（「全て」以外） */
.filter ul li:not([data-category="全て"])::before {
    content: "#";
}

/* 記事のカテゴリー表示から#を明示的に削除 */
.article .cat::before {
    content: "" !important;
}


