/* メインコンテナ */
.rss-feed-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
    margin: 20px 0;
    width: 100%;
    box-sizing: border-box;
    padding: 0;
}

/* 各セクション（プログラム、お知らせ、事業報告） */
.rss-feed-section {
    flex: 1;
    min-width: 300px;
    margin-bottom: 30px;
    box-sizing: border-box;
    padding: 0;
}

/* 見出し */
.rss-feed-section .midashi {
    font-size: 1.2em;
    font-weight: bold;
    margin: 0 0 15px 0;
    padding: 12px 15px;
    border-radius: 4px;
    line-height: 1.4;
}

/* フィードタイプ別の見出しスタイル */
.rss-feed-section[data-type="program"] .midashi {
    background-color: #e8f5e9;
    color: #388e3c;
    border-left: 5px solid #388e3c;
}

.rss-feed-section[data-type="news"] .midashi {
    background-color: #e8f5e9;
    color: #388e3c;
    border-left: 5px solid #388e3c;
}

.rss-feed-section[data-type="business"] .midashi {
    background-color: #e8f5e9;
    color: #388e3c;
    border-left: 5px solid #388e3c;
}

/* フィードアイテムのコンテナ */
.feed-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 0;
    padding: 0;
    width: 100%;
    box-sizing: border-box;
}

/* 各アイテムのカード */
.feed-item {
    background: #ffffff;
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    height: 380px;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    position: relative;
}

/* カードのホバー効果 */
.feed-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

/* カード内のリンク */
.feed-item a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

/* 画像コンテナ */
.feed-item .image-container {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    border-radius: 8px 8px 0 0;
}

/* 画像 */
.feed-item .image-container img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    vertical-align: middle;
    border: none;
    margin: 0;
    padding: 0;
}

/* コンテンツ部分 */
.feed-item .content {
    padding: 18px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    box-sizing: border-box;
    background-color: #ffffff;
}

/* 日付 */
.feed-item .date {
    font-size: 0.8em;
    color: #757575;
    background-color: #f5f5f5;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
    margin: 0 0 5px 0;
    padding: 0;
    flex-shrink: 0;
    font-weight: normal;
    line-height: 1.4;
}

/* ソース（サイト名） */
.feed-item .source {
    font-size: 0.7em;
    font-weight: 600;
    color: #424242;
    margin: 10px 0;
    padding: 0;
    flex-shrink: 0;
    line-height: 1.4;
}

/* タイトル */
.feed-item .title {
    font-size: 1.1em;
    line-height: 1.6;
    color: #212121;
    margin: 0;
    padding: 0;
    display: -webkit-box;
    display: -moz-box;
    display: box;
    -webkit-line-clamp: 3;
    -moz-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    -moz-box-orient: vertical;
    box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 4.5em;
    word-break: break-word;
    font-weight: 500;
}

/* もっと見るボタン */
.more-button {
    text-align: center;
    margin: 20px 0 0 0;
    padding: 0;
    width: 100%;
    box-sizing: border-box;
}

/* もっと見るボタンのリンク */
.more-button a {
    display: inline-block;
    padding: 10px 25px;
    background-color: #0066cc;
    color: #ffffff;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.2s ease;
    font-size: 0.9em;
    line-height: 1.4;
    border: none;
    cursor: pointer;
    font-weight: normal;
    text-align: center;
    margin: 0;
    font-weight: 500;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* もっと見るボタンのホバー効果 */
.more-button a:hover {
    background-color: #0052a3;
}

/* デスクトップ大画面 */
@media screen and (min-width: 1201px) {
    .feed-item {
        height: 360px;
    }
    .feed-item .image-container {
        height: 200px;
    }
}

/* デスクトップ標準 */
@media screen and (max-width: 1200px) {
    .feed-item {
        height: 340px;
    }
    .feed-item .image-container {
        height: 180px;
    }
}

/* タブレット */
@media screen and (max-width: 1024px) {
    .rss-feed-section {
        min-width: calc(50% - 10px);
        flex: 0 0 calc(50% - 10px);
    }
    .feed-item {
        height: 320px;
    }
    .feed-item .image-container {
        height: 160px;
    }
}

/* タブレット/スマートフォン */
@media screen and (max-width: 768px) {
    .rss-feed-section {
        min-width: 100%;
        flex: 0 0 100%;
    }
    .feed-item {
        height: 360px;
    }
    .feed-item .image-container {
        height: 200px;
    }
}

/* スマートフォン */
@media screen and (max-width: 480px) {
    .feed-item {
        height: 340px;
    }
    .feed-item .image-container {
        height: 180px;
    }
    .feed-item .title {
        font-size: 0.95em;
    }
}

.rss-feed-section[data-type="program"] .more-button a {
    background-color: #388e3c;
}

.rss-feed-section[data-type="news"] .more-button a {
    background-color: #388e3c;
}

.rss-feed-section[data-type="business"] .more-button a {
    background-color: #388e3c;
}