/* ============================================================
   news.css — 新着情報 一覧・詳細ページ
   日本コロイド株式会社
   ルール：
   ・body と同値（clamp(1.5rem,1.4vw,1.6rem)）なら font-size 指定しない
   ・指定する場合は必ず clamp(最小値, 推奨値, 最大値)
   ・レスポンシブは各セクション直後に記述
   ============================================================ */

/* ============================================================
   バッジ共通（style.css に依存しないよう news.css に定義）
   ============================================================ */
.news__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(1.2rem, 1.3vw, 1.4rem);
    font-weight: 600;
    border-radius: 999px;
    padding: 0.2rem 1.2rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.news__badge--fill {
    background: var(--color-main);
    color: var(--color-white);
}

.news__badge--campaign {
    background: var(--color-white);
    color: var(--color-main);
    border: 1px solid var(--color-main);
}

.news__badge--outline {
    border: 1.5px solid var(--color-main);
    color: var(--color-main);
    background: transparent;
}


/* ============================================================
   一覧：セクションラッパー
   ============================================================ */
.news-list-section {
    background: var(--color-white);
    padding: 6rem 0 9rem;
}

@media (max-width: 768px) {
    .news-list-section {
        padding: 4rem 0 6rem;
    }
}


/* ============================================================
   一覧：カテゴリーフィルターボタン
   ============================================================ */
.filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 4rem;
}

.filter__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    padding: 0 2rem;
    border: 1.5px solid var(--color-main);
    background: transparent;
    color: var(--color-main);
    font-family: var(--font-jp);
    font-size: clamp(1.3rem, 1.2vw, 1.5rem);
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
    border-radius: 2px;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}

.filter__btn:hover,
.filter__btn.is-active {
    background: var(--color-main);
    color: var(--color-white);
}

@media (max-width: 768px) {
    .filter {
        gap: 6px;
        margin-bottom: 2.8rem;
    }

    .filter__btn {
        height: 34px;
        padding: 0 1.4rem;
        font-size: clamp(1.2rem, 3.2vw, 1.4rem);
    }
}


/* ============================================================
   一覧：ニュースリスト・アイテム
   ============================================================ */
.news-list {
    border-top: 1px solid var(--color-border);
}

.news-list:has(.news-list__empty) {
    border-top: none;
}

.news-list__item {
    border-bottom: 1px solid var(--color-border);
}

.news-list__item.is-hidden {
    display: none;
}

.news-list__link {
    display: grid;
    grid-template-columns: 110px 130px 1fr 20px;
    align-items: center;
    gap: 2rem;
    padding: 1.8rem 1rem;
    color: var(--color-text);
    text-decoration: none;
    transition: background 0.15s;
}

.news-list__link:hover {
    background: var(--color-bg-green);
    opacity: 1;
}

.news-list__link:hover .news-list__title {
    color: var(--color-main);
}

.news-list__date {
    font-family: var(--font-en);
    font-size: 1.5rem;
    color: var(--color-text-light);
    white-space: nowrap;
    padding-left: 1rem;
}

.news-list__badge-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
}

.news-list__title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    transition: color 0.2s;
}

.news-list__arrow {
    font-family: var(--font-en);
    font-size: clamp(1.3rem, 1.2vw, 1.5rem);
    color: var(--color-main);
    text-align: right;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .news-list__link {
        grid-template-columns: auto 1fr 20px;
        grid-template-rows: auto auto;
        gap: 0.8rem 1rem;
        padding: 1.6rem 0.8rem;
    }

    .news-list__date {
        grid-column: 1;
        grid-row: 1;
        font-size: clamp(1.2rem, 3vw, 1.4rem);
        padding-left: 0;
    }

    .news-list__badge-wrap {
        grid-column: 2;
        grid-row: 1;
        justify-content: flex-start;
    }

    .news-list__title {
        grid-column: 1 / 3;
        grid-row: 2;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }

    .news-list__arrow {
        grid-column: 3;
        grid-row: 1 / 3;
        align-self: center;
    }
}

@media (max-width: 599px) {
    .news-list__link {
        grid-template-columns: auto auto 1fr 20px;
        grid-template-rows: auto auto;
        grid-template-areas:
            "date badge . arrow"
            "title title title arrow";
        gap: 0.6rem 1rem;
        padding: 1.4rem 0.4rem;
    }

    .news-list__date {
        grid-area: date;
    }

    .news-list__badge-wrap {
        grid-area: badge;
    }

    .news-list__title {
        grid-area: title;
        white-space: normal;
    }

    .news-list__arrow {
        grid-area: arrow;
        align-self: center;
    }
}


/* ============================================================
   一覧：ページャー
   ============================================================ */
.pager {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.2rem;
    margin-top: 5rem;
}

.pager__list {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.pager__num,
.pager__prev,
.pager__next {
    width: 42px;
    height: 42px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1.5px solid var(--color-main);
    color: var(--color-main);
    text-decoration: none;
    font-size: clamp(1.3rem, 1.2vw, 1.5rem);
    font-weight: 600;
    transition: background 0.2s, color 0.2s;
    border-radius: 2px;
}

.pager__num:hover,
.pager__prev:hover,
.pager__next:hover {
    background: var(--color-main);
    color: var(--color-white);
    opacity: 1;
}

.pager__num.is-current {
    background: var(--color-main);
    color: var(--color-white);
    pointer-events: none;
}

.pager__prev.is-disabled,
.pager__next.is-disabled {
    border-color: var(--color-border);
    color: var(--color-border);
    pointer-events: none;
}

.pager__dots {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    color: var(--color-text-light);
    font-size: clamp(1.3rem, 1.2vw, 1.5rem);
}

@media (max-width: 768px) {
    .pager {
        gap: 0.8rem;
        margin-top: 3.6rem;
    }

    .pager__list {
        gap: 0.6rem;
    }

    .pager__num,
    .pager__prev,
    .pager__next {
        width: 36px;
        height: 36px;
        font-size: clamp(1.2rem, 3vw, 1.4rem);
    }

    .pager__dots {
        width: 18px;
        font-size: clamp(1.2rem, 3vw, 1.4rem);
    }
}


/* ============================================================
   詳細：セクションラッパー
   ============================================================ */
.news-detail {
    background: var(--color-white);
    padding: 6rem 0 9rem;
}

@media (max-width: 768px) {
    .news-detail {
        padding: 4rem 0 6rem;
    }
}


/* ============================================================
   詳細：タイトル
   ============================================================ */
.news-detail__title {
    font-size: clamp(1.8rem, 2vw, 2.4rem);
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.55;
    margin-bottom: 1.6rem;
}

@media (max-width: 768px) {
    .news-detail__title {
        font-size: clamp(1.6rem, 4.8vw, 2rem);
    }
}


/* ============================================================
   詳細：区切り線
   ============================================================ */
.news-detail__divider {
    height: 2px;
    background: var(--color-main);
    border: none;
    margin: 0 0 1.6rem;
}


/* ============================================================
   詳細：メタ情報（カテゴリー + 日付）
   ============================================================ */
.news-detail__meta {
    display: flex;
    align-items: center;
    gap: 1.6rem;
    margin-bottom: 4.8rem;
}

.news-detail__cat {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.3rem 1.4rem;
    border-radius: 999px;
    font-size: clamp(1.2rem, 1.1vw, 1.4rem);
    font-weight: 600;
    white-space: nowrap;
    background: var(--color-main);
    color: var(--color-white);
}

.news-detail__cat--important {
    background: #c0392b;
}

.news-detail__cat--outline {
    background: transparent;
    border: 1.5px solid var(--color-main);
    color: var(--color-main);
}

.news-detail__date {
    font-family: var(--font-en);
    font-size: clamp(1.3rem, 1.2vw, 1.5rem);
    color: var(--color-text-light);
    letter-spacing: 0.04em;
}

@media (max-width: 768px) {
    .news-detail__meta {
        gap: 1.2rem;
        margin-bottom: 3.2rem;
    }
}


/* ============================================================
   詳細：本文エリア
   ============================================================ */
.news-detail__body {
    line-height: 2;
    color: var(--color-text);
    margin-bottom: 5.6rem;
    padding: 0 1rem;
}

.news-detail__body p {
    margin-bottom: 2.4rem;
}

.news-detail__body p:last-child {
    margin-bottom: 0;
}

.news-detail__body a {
    color: var(--color-main);
    text-decoration: underline;
    transition: opacity 0.2s;
}

.news-detail__body a:hover {
    opacity: 0.7;
}

.news-detail__body h3 {
    font-size: clamp(1.6rem, 1.5vw, 1.9rem);
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 1.2rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--color-border);
}

@media (max-width: 768px) {
    .news-detail__body {
        padding: 0;
        margin-bottom: 4rem;
    }

    .news-detail__body h3 {
        font-size: clamp(1.5rem, 4.5vw, 1.8rem);
    }
}


/* ============================================================
   詳細：会社情報ボックス
   ============================================================ */
.news-detail__company {
    background: var(--color-bg-green);
    padding: 2.4rem 3.2rem;
    margin-bottom: 5.6rem;
    border-radius: 2px;
}

.news-detail__company-name {
    font-size: clamp(1.5rem, 1.4vw, 1.7rem);
    font-weight: 700;
    color: var(--color-main);
    margin-bottom: 1rem;
}

.news-detail__company-info {
    line-height: 2;
    color: var(--color-text);
}

@media (max-width: 768px) {
    .news-detail__company {
        padding: 2rem;
        margin-bottom: 4rem;
    }

    .news-detail__company-info .slash {
        display: none !important;
    }
}


/* ============================================================
   詳細：記事ナビゲーション（前の記事・一覧・次の記事）
   ============================================================ */
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 2.4rem;
    border-top: 1px solid var(--color-border);
    gap: 1.2rem;
}

.pagination__prev,
.pagination__next {
    font-size: clamp(1.3rem, 1.2vw, 1.5rem);
    color: var(--color-main);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    transition: opacity 0.2s;
    text-decoration: none;
    white-space: nowrap;
}

.pagination__prev:hover,
.pagination__next:hover {
    opacity: 0.7;
}

.pagination__prev::before {
    content: '＜';
    font-size: clamp(1.2rem, 1.1vw, 1.4rem);
}

.pagination__next::after {
    content: '＞';
    font-size: clamp(1.2rem, 1.1vw, 1.4rem);
}

.pagination__top {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    padding: 0 3.2rem;
    border: 1.5px solid var(--color-main);
    background: transparent;
    color: var(--color-main);
    font-size: clamp(1.3rem, 1.2vw, 1.5rem);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-decoration: none;
    border-radius: 2px;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}

.pagination__top:hover {
    background: var(--color-main);
    color: var(--color-white);
    opacity: 1;
}

.pagination__prev--disabled,
.pagination__next--disabled {
    color: var(--color-border);
    pointer-events: none;
}

@media (max-width: 768px) {
    .pagination {
        padding-top: 2rem;
        gap: 0.8rem;
    }

    .pagination__prev,
    .pagination__next {
        font-size: clamp(1.2rem, 3.2vw, 1.4rem);
    }

    .pagination__top {
        height: 38px;
        padding: 0 2rem;
        font-size: clamp(1.2rem, 3.2vw, 1.4rem);
    }
}