/* =================================================================
                        News / お知らせ
===================================================================*/

/* ■ セクション全体のレイアウト設定 */
.news {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 80px 40px 140px;

    position: relative;
}

.news__inner {
    margin: 0 auto;
}

/* ■ リンク（一覧ページへのボタン等） */
.news__link {
    margin-top: -120px;
    margin-bottom: 80px;
    text-align: right;
}

/* ■ ニュースリストのレイアウト */
.news__list {
    width: 900px; /* news__itemと同じ幅に合わせる */
    margin: 0 auto;
    padding-bottom: 80px;
    text-align: left; /* リスト内のテキストは左寄せ */

    display: block;
}

/* ■ ニュース個別アイテム */
.news__item {
    width: 100%; 
    padding-top: 1.6666em;
    padding-bottom: 1.6666em;
    border-bottom: 2px solid #C1C1C1;

    font-weight: 700;
    text-align: left;

    transition: opacity 0.3s ease; 
}

.news__item:first-child {
    padding-top: 0;
}

/* ■ アイテム内リンク（全体を囲うaタグ） */
.news__item__link {
    padding-right: 2em;

    display: flex;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    gap: 0.5em; /* dateとtitleの間隔 */

    color: inherit;
    text-decoration: none;
}

.news__item:hover {
    opacity: 0.5;
}

/* ■ ニュースタイトル */
.news__title {
    margin: 0; /* pタグのデフォルトマージン除去 */

    font-size: var(--font-size-body-lg);
    font-weight: 700;
    line-height: 1.75;
}

/* ■ ニュース日付 */
.news__date {
    padding-right: 1em;

    font-size: var(--font-size-body-md);
    font-weight: 500;
    line-height: 1.75;

    color: #565656;
}

/* ■ アイコン（右矢印） */
.news__icon {
    font-size: 1em;
    color: #c1c1c1;

    position: absolute;
    right: 0;
    top: 50%;

    transition: transform 0.3s ease;
    transform: translateY(-50%);
}

/* ホバー時にアイコンが右に動く */
.news__item__link:hover .news__icon {
    transform: translateY(-50%) translateX(5px);
}


/* =================================================================
                        ページネーション
===================================================================*/

.pagination {
    gap: 30px;

    display: flex;
    justify-content: center;
    align-items: center;
}

.pagination__number {
    width: 40px;
    height: 40px;
    line-height: 40px;
    border-radius: 50%;

    font-size: var(--font-size-body-lg);
    font-weight: 700;
    color: var(--text-color-blue);

    display: inline-block;
    text-align: center;
    text-decoration: none;
    background-color: #F7F7F7;

    transition: all 0.3s ease;
}

.pagination__number:hover {
    background-color: #dbdbdb;
}

.pagination__number--current {
    background-color: var(--text-color-blue); /* ネイビーカラー */
    color: var(--text-color-white); 
    pointer-events: none;
}


/* =================================================================
                        News Detail
===================================================================*/

/* ■ セクション全体 */
.news-detail {
    padding: 200px 0 160px;

    color: var(--text-color-black);
}

.news-detail__inner {
    max-width: 980px;
    margin: 0 auto;
    padding: 160px 40px 160px;
}

/* ■ 日付、カテゴリラベル、タイトル */
.news-detail__date {
    padding-bottom: 0.625em;

    display: block;

    font-size: var(--font-size-body-md);
    font-weight: 500;
    line-height: 1.75;

    color: #565656;
}

.news-detail__label {
    padding: 2px 10px;
    margin-bottom: 12px;
    border-radius: 12px;
    border: 1px solid #001e60;

    display: inline-block;

    font-size: 12px;
    color: #001e60;
}

.news-detail__title {
    margin-bottom: 1.22em;

    font-size: var(--font-size-body-lg);
    font-weight: bold;
}

/* ■ 区切り線 */
.news-detail__divider {
    border: none;
    border-top: 2px solid var(--text-color-blue);

    margin-bottom: 24px;
}

/* ■ 記事本文 */
.news-detail__content {
    padding-bottom: 8.125em;

    font-size: var(--font-size-body-md);
    font-weight: 400;
    line-height: 1.75;
}

.news-detail__content p {
    margin-bottom: 1em;

    font-size: var(--font-size-body-md);
    line-height: 1.8;
}

/* ■ 前後の記事ナビゲーション */
.news-detail__nav {
    gap: 20px;

    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.news-detail__prev,
.news-detail__next {
    font-size: var(--font-size-body-md);
    color: var(--text-color-gray);
    text-decoration: none;
    transition: opacity .3s ease;
}

.news-detail__prev:hover,
.news-detail__next:hover {
    opacity: .5;
}

/* ■ 一覧に戻るボタン */
.news-detail__back {
    margin: 0 auto;
    padding: 1.5em 3em 1.5em 4.8em;
    border-radius: 999px;
    background-color: #001e60;

    position: relative;

    font-size: var(--font-size-body-md);
    font-weight: 700;
    color: var(--text-color-white);
    text-align: center;
    text-decoration: none;

    display: inline-block;
    transition: background-color 0.3s ease, opacity 0.3s ease;
}

.news-detail__back::before {
    width: 9px;
    height: 9px;
    border-top: 2px solid var(--text-color-white);
    border-right: 2px solid var(--text-color-white);

    position: absolute;
    top: 50%;
    left: 3em;

    content: '';
    transition: transform 0.3s ease, left 0.3s ease;
    transform: translate(-50%, -50%) rotate(-135deg);
}

.news-detail__back:hover {
    opacity: .5;
}

.news-detail__back:hover::before {
    left: 2.7em; /* ちょっと左に動かす */
}

/* ■ 本文内の画像・リンク */
.news-detail img {
    width: 80%;
    height: auto;
}

.news-detail p a {
    color: var(--text-color-blue);
    text-decoration: underline;
    transition: background-color 0.3s ease, opacity 0.3s ease;
}

.news-detail p a:hover {
    opacity: .5;
}


/* ========================= タブレット・レスポンシブ対応（1024px以下） ========================= */

@media (max-width: 1024px) {
    .news {
        padding: 80px 40px;
    }

    .news__list,
    .news__item {
        width: 100%;
    }
}


/* ========================= SP・レスポンシブ対応（768px以下） ========================= */

@media (max-width: 768px) {
    .news {
        padding: 80px 24px;
    }

    .news__link {
        margin-top: initial;
        margin-bottom: 40px;
    }

    .news__inner {
        padding: 0;
    }

    .news__list {
        width: 100%;  
        padding-bottom: 50px;
    }

    .news__date {
        font-size: 1.2rem;
    }

    .news__item__link {
        flex-direction: column;
        align-items: flex-start;
        gap: initial;
    }

    .news__icon {
        top: auto;
        bottom: 6px;
        transform: translateY(6);
    }

    .pagination {
        gap: 16px;
    }

    .pagination__number {
        width: 30px;
        height: 30px;
        line-height: 30px;
    }

    .news-detail {
        padding: 100px 0 80px;
    }

    .news-detail__inner {
        padding: 80px 24px 80px;
    }

    .news-detail__content {
        padding-bottom: 4.125em;
    }

    .news-detail__nav {
        align-items: center;
    }

    .news-detail__prev,
    .news-detail__next {
        width: 40%;
        display: inline-block;
    }

    .news-detail__next {
        text-align: right;
    }

    .news-detail__back {
        order: 3;
        width: 100%;
        min-width: 180px;
        max-width: 240px;
        text-align: center;
    }
}
