/* ==============================================
   お知らせ一覧 (home.php / archive.php)
   ============================================== */

/* ラッパー
--------------------------------------------- */
.news-archive {
    max-width: var(--content-max-width);
    margin-inline: auto;
    padding: 60px var(--content-padding-inline) 120px;
}


/* セクションヘッダー
--------------------------------------------- */
.news-archive-header {
    position: relative;
    padding-bottom: 60px;
    margin-bottom: 0;
    border-bottom: 1px solid var(--color-secondary);
}

.news-archive-header h1 {
    font-size: clamp(1.75rem, calc(1.266rem + 2.066vw), 3.125rem);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0;
}

.news-archive-header h1::after {
    display: none;
}


/* カテゴリタブ
--------------------------------------------- */
.news-tabs {
    position: absolute;
    bottom: -1px;
    right: 0;
    display: flex;
    gap: 8px;
}

.news-tab {
    display: inline-block;
    padding: 10px 20px;
    font-size: 0.9375rem;
    color: var(--color-text);
    text-decoration: none;
    white-space: nowrap;
    border: 1px solid #BCBCBC;
    border-bottom-color: var(--color-secondary);
    border-radius: 5px 5px 0 0;
    background: var(--color-white);
    transition: color 0.2s, border-color 0.2s;
}

.news-tab:hover {
    color: var(--color-secondary);
    border-color: var(--color-secondary);
}

.news-tab.is-active {
    color: var(--color-secondary);
    border: 1px solid var(--color-secondary);
    border-bottom-color: var(--color-white);
    border-radius: 5px 5px 0 0;
    font-weight: 700;
}


/* 投稿リスト
--------------------------------------------- */
.news-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

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

.news-row-link {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 22px 0;
    color: var(--color-text);
    text-decoration: none;
}

.news-row-link:hover .news-row-title {
    text-decoration: underline;
    color: var(--color-primary);
}

.news-date {
    white-space: nowrap;
    flex-shrink: 0;
}


/* カテゴリバッジ
--------------------------------------------- */
.news-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 12px;
    font-size: 0.9375rem;
    font-weight: 500;
    white-space: nowrap;
    min-width: 110px;
    flex-shrink: 0;
    background: #F2F4F7;
    color: #051152;
    border-radius: 50px;
}

.news-row-title {
    flex: 1;
    font-size: 0.9375rem;
    line-height: 1.6;
}


/* 空コンテンツ
--------------------------------------------- */
.news-empty {
    padding: 60px 0;
    text-align: center;
    color: #888;
}


/* ページネーション
--------------------------------------------- */
.news-archive .navigation.pagination {
    margin-top: 60px;
}

.news-archive .nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.news-archive .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    font-size: 0.9375rem;
    color: var(--color-text);
    text-decoration: none;
    border: 1px solid var(--color-border);
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.news-archive .page-numbers:hover {
    background: var(--color-bg-light);
}

.news-archive .page-numbers.current {
    background: var(--color-secondary);
    color: #fff;
    border-color: var(--color-secondary);
}

.news-archive .page-numbers.dots {
    border: none;
    width: auto;
    padding: 0 4px;
}

.news-archive .page-numbers.prev,
.news-archive .page-numbers.next {
    font-size: 1.125rem;
    font-weight: 700;
}


/* ==============================================
   投稿詳細 (single.php)
   ============================================== */

.news-single {
    max-width: 1100px;
    margin-inline: auto;
    padding: 60px var(--content-padding-inline) 120px;
}

.news-single-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.news-single-meta .news-date {
    font-size: 0.9375rem;
    color: var(--color-primary);
    font-weight: 700;
}

.news-single-title {
    font-size: clamp(1.25rem, calc(1.018rem + 1.071vw), 1.75rem);
    font-weight: 700;
    line-height: 1.5;
    padding-bottom: 10px;
    margin-bottom: 40px;
    border-bottom: 1px solid var(--color-border);
}

.news-single-thumbnail {
    margin-bottom: 40px;
}

.news-single-thumbnail img {
    width: 100%;
    height: auto;
}

/* 本文タイポグラフィ
--------------------------------------------- */
.entry-content {
    font-size: 1rem;
    line-height: 1.9;
}

.entry-content p {
    margin-bottom: 1.5em;
}

.entry-content h2 {
    font-size: 1.125rem;
    font-weight: 700;
    padding-left: 16px;
    border-left: 4px solid var(--color-primary);
    margin: 2em 0 1em;
    line-height: 1.5;
}

.entry-content h3 {
    font-size: 1.225rem;
    font-weight: 700;
    color: var(--color-primary);
    padding-left: 10px;
    margin: 1.75em 0 1.2em;
    border-left: 5px solid #B2C1DB;
}

.entry-content ul,
.entry-content ol {
    padding-left: 1.5em;
    margin-bottom: 1.5em;
}

.entry-content ul {
    list-style: none;
    padding-left: 0;
}

.entry-content ul li {
    padding-left: 1.5em;
    position: relative;
}

.entry-content ul li::before {
    content: "■";
    position: absolute;
    left: 0;
    color: var(--color-primary);
    font-size: 1.65em;
    top: -0.45em;
}

.entry-content ol {
    list-style: decimal;
}

.entry-content li {
    margin-bottom: 0.5em;
    line-height: 1.8;
}

.entry-content a {
    color: var(--color-primary);
    text-decoration: underline;
}

.entry-content img {
    max-width: 100%;
    height: auto;
}

/* 前後ナビゲーション
--------------------------------------------- */
.news-single-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: var(--color-bg-gray);
    padding: 24px 40px;
    margin-top: 80px;
    border-radius: 50px;
}

.news-nav-prev,
.news-nav-next {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9375rem;
    color: var(--color-text);
    text-decoration: none;
    transition: opacity 0.2s;
}

.news-nav-prev:hover,
.news-nav-next:hover {
    opacity: 0.7;
}

.news-nav-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color-secondary);
    flex-shrink: 0;
}

.news-nav-arrow img {
    width: 10px;
    height: auto;
    display: block;
}

.news-nav-arrow--prev img {
    transform: rotate(90deg);
}

.news-nav-arrow--next img {
    transform: rotate(-90deg);
}

.news-nav-list {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: var(--color-secondary);
    color: #fff;
    font-size: 0.9375rem;
    text-decoration: none;
    white-space: nowrap;
    transition: opacity 0.2s;
}

.news-nav-list::after {
    content: '→';
}

.news-nav-list:hover {
    opacity: 0.8;
}

.news-nav-placeholder {
    width: 36px;
    flex-shrink: 0;
}


/* ==============================================
   Responsive - Mobile (〜768px)
   ============================================== */
@media (max-width: 768px) {

    .news-archive {
        padding-top: 40px;
        padding-bottom: 80px;
    }

    .news-archive-header {
        padding-bottom: 0;
        border-bottom: none;
        margin-bottom: 0;
    }

    .news-archive-header h1 {
        margin-bottom: 40px;
    }

    .news-tabs {
        position: static;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        border-bottom: 1px solid var(--color-secondary);
        margin-bottom: 0;
    }

    .news-tabs::-webkit-scrollbar {
        display: none;
    }

    .news-tab {
        padding: 10px 14px;
        font-size: 0.875rem;
        border-radius: 5px 5px 0 0;
    }

    .news-tab.is-active {
        border-bottom: none;
        border-radius: 5px 5px 0 0;
    }

    .news-row-link {
        flex-wrap: wrap;
        gap: 8px 12px;
        padding: 16px 0;
    }

    .news-date {
        order: 1;
    }

    .news-badge {
        order: 2;
        min-width: auto;
    }

    .news-row-title {
        order: 3;
        flex-basis: 100%;
    }

    .news-archive .page-numbers {
        width: 36px;
        height: 36px;
        font-size: 0.875rem;
    }

    .news-single {
        padding-top: 40px;
        padding-bottom: 80px;
    }

    .news-single-title {
        margin-bottom: 28px;
    }

    .news-single-thumbnail {
        margin-bottom: 28px;
    }

    .news-single-nav {
        /* flex-direction: column; */
        gap: 16px;
        padding: 24px 20px;
        margin-top: 60px;
        display: grid;
        grid-template:
            "prev next" auto
            "btn btn" 1fr / 1fr 1fr;
        justify-content: center;
    }
    .news-single-nav .news-nav-prev {grid-area:prev;}
    .news-single-nav .news-nav-next {grid-area:next;justify-content: end;}
    .news-single-nav .btn-more { 
        grid-area:btn;
        width: fit-content;
        margin-inline: auto;
    }

    .news-nav-placeholder {
        display: none;
    }
}
