/* ════════════════════════════════════════════════ */
/* ▶ SECTION STYLING                                */
/* ════════════════════════════════════════════════ */

.section1 { background-color: #f17fb2; }
.section2 { background-color: #f17fb2; }
.section3 { background-color: #f17fb2; }
.section4 { background-color: #ee3a37; }


/* ════════════════════════════════════════════════ */
/* ▶ NAVBAR: ACTIVE PAGE                            */
/* ════════════════════════════════════════════════ */

li .nav-button-news {
    text-decoration: underline;
    text-decoration-thickness: 4px;
    text-underline-offset: 6px;
}

li .nav-button-news:hover {
    color: #0051a4;
}


/* ════════════════════════════════════════════════ */
/* ▶ NEWS FLEXBOX                                   */
/* ════════════════════════════════════════════════ */

.title {
    margin-top: 30px;
}

.news-flexbox {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 48px 10px;
    justify-content: space-around;
    margin: 50px 20px;
    gap: 50px 50px;
}

.news-item {
    flex: 1 1 30%;
    display: flex;
    flex-direction: column;
    background: white;
    color: #222;
    border-radius: 16px;
    box-shadow: 5px 15px 10px rgba(0, 0, 0, 0.1);
    padding: 25px 25px;
    max-width: 400px;
    min-width: 220px;

}

.body-container {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    height: 100%;
}

.news-item .news-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    object-position: center center;
    border-radius: 8px;
    margin-bottom: 1rem ;
    background: #eee;
}

.post-title {
    color: #333;
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.post-date {
    display: inline;
    font-size: 1.1rem;
    color: #666;
    font-weight: lighter;
    margin-right: 10px;
}

.post-content {
    flex: 1 1 auto;
    min-height: 60px;
    font-weight: lighter;
    line-height: 1.5;
    color: #333;
    font-size: 1.2rem;
    text-align: justify;
    margin-top: 20px;
    margin-bottom: 30px;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.post-title,
.post-date,
.tag-container,
.post-content {
    /* Ensure these take full width and don't collapse */
    width: 100%;
}

.read-more {
    display: inline-block;
    margin-top: auto;
    font-size: 1rem;
    text-decoration: none;
    color: #0051a4;
    transition: all 0.5s ease-in-out;
    position: relative; /* Ensure ::after is positioned relative to this */
    align-self: flex-start;
}


.read-more::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 0;
    height: 2px;
    background-color: #0051a4;
    transition: width 0.3s ease;
}

.read-more:hover::after {
    width: 100%;
}

@media (max-width: 900px) {
    .news-flexbox {
        gap: 20px;
    }
    .news-item {
        max-width: 100%;
        min-width: 180px;
        flex: 1 1 45%;
    }
}

@media (max-width: 600px) {
    .news-flexbox {
        flex-direction: column;
        gap: 16px;
    }
    .news-item {
        max-width: 100%;
        min-width: 0;
        flex: 1 1 100%;
        padding: 20px 20px;
    }
    .news-item .news-image {
        height: 120px;
    }
    .flexbox {
        flex-direction: column;
        gap: 16px;
    }
    .flexbox-item {
        min-width: 0;
        max-width: 100%;
        flex-basis: 100%;
    }
}

/* ════════════════════════════════════════════════ */
/* ▶ NEWS CATEGORIES (TAGS)                         */
/* ════════════════════════════════════════════════ */

.post-category {
  display: inline;
  font-size: 1rem;
  color: #0051a4;
  background-color: #0052a431;
  border-radius: 50px;
  padding: 2px 10px;
}

.post-category-sport {
  color: #ee3a37;
  background-color: #ee3a3744;
}

.post-category-koken {
  color: #3aba9b;
  background-color: #3aba9a48;
}