.flex-container {
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 3%;
}

.item {
    width: 30%;
    background-color: #f8f8f8;
    /* border: solid 1px #888888; /* 枠線を細くする */
    border-radius: 5px;
    box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.2);
    overflow: hidden; /* これによりborder-radiusが子要素にも適用される */
    margin-bottom: 40px;
    transition: all 0.5s ease;
}

.item:hover {
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.3);
    transform: translateY(-5px); /* 軽い浮き上がり効果 */
}

.item .img img {
    position: relative;
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: all 0.3s ease; /* インタラクティブな効果のため */

}

.item .text-container {
    height: 100%;
    padding-bottom: 10px;
    background: #fff;
    color: #000;
}

/* オプション: 画像にホバー時のズーム効果を追加 */
.item .img img:hover {
    transform: scale(1.05);
}

.item {
    color: #fff;
}

.item .event-title {
    width: 100%;
    color: #fff;
    background: #333333;
    font-size: 1.3rem;
    margin-bottom: 15px;
    padding: 10px;
}

.item .event-date {
    display: block;
    margin-bottom: 10px;
    padding-left: 10px;
}

.item .event-date span {
    font-weight: bold;
}

.item p {
    padding-left: 10px;
}

.pagination {
    display: flex;
    padding-top: 30px;
    justify-content: center;
}

.pagination a {
    color: #000;
    float: left;
    padding: 8px 16px;
    text-decoration: none;
    border: 1px solid #ddd;
}

.pagination a.active {
    background: #006ab2;
    color: #fff;
}

.pagination a:hover:not(.active) {
    background: #ddd;
}

@media screen and (max-width: 1024px) {
    .flex-container {
        flex-direction: column;
    }

    .item {
        width: 100%;
    }

}