/* ==========================================================================
                    新着情報ページのスタイル（アーカイブ/投稿）
   ========================================================================== */

/* ページコンテンツのレイアウト（アーカイブページ）
   ========================================================================== */
.page-content__layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 5rem;
}

@media (1024px < width) {
    .page-content__layout {
        grid-template-columns: 1fr 12.5rem;
        column-gap: 4rem;
        row-gap: 5rem;
    }

    .page-content__main {
        grid-area: 1 / 1 / 2 / 2;
    }

    .page-content__sidebar {
        grid-area: 1 / 2 / 2 / 3;
    }

    .pagination {
        grid-area: 2 / 1 / 3 / 3;
    }
}

/* アーカイブページのスタイル
   ========================================================================== */

.archive-news-content {
    padding-top: clamp(2.5rem, calc(-1.038rem + 9.434vw), 5rem);
    /* min: 40px, max: 80px */
    padding-bottom: clamp(5rem, calc(-2.075rem + 18.868vw), 10rem);
    /* min: 80px, max: 160px */

    .news-item {
        padding-bottom: clamp(0.5rem, calc(-0.561rem + 2.83vw), 1.25rem);
        /* min: 8px, max: 20px */
        border-bottom: 1px solid #7B7B7B;

        .news-item__date {
            font-family: var(--font-en);
            font-size: 0.75rem;
            /* min: 10px, max: 12px */
            color: #7B7B7B;
        }

        .news-item__category {
            display: inline-block;
            margin-left: 1rem;
            padding: 0 0.75rem;
            color: #7B7B7B;
            font-size: clamp(0.625rem, calc(0.448rem + 0.472vw), 0.75rem);
            /* min: 10px, max: 12px */
            border: 1px solid #7B7B7B;
            border-radius: 1rem;

            @media screen and (width <=600px) {
                padding: 0.125rem 1rem;
            }
        }

        .news-item__title {
            margin-top: clamp(0.5rem, calc(-0.915rem + 3.774vw), 1.5rem);
            /* min: 8px, max: 24px */
            font-size: clamp(0.875rem, calc(0.521rem + 0.943vw), 1.125rem);
            /* min: 14px, max: 18px */
            font-weight: 500;
            letter-spacing: 0.1em;
        }
    }

    .news-item+.news-item {
        margin-top: clamp(2rem, calc(1.292rem + 1.887vw), 2.5rem);
        /* min: 32px, max: 40px */
    }
}


/* サイドバーのスタイル（アーカイブページ）
   ========================================================================== */
.sidebar-news {
    .sidebar-news__title {
        font-family: var(--font-en);
        color: var(--primary-color);
        font-size: clamp(1.125rem, calc(0.948rem + 0.472vw), 1.25rem);
        /* min: 18px, max: 20px */
        letter-spacing: 0.1em;
        font-weight: 700;
        text-transform: uppercase;
        padding-bottom: 0.5rem;
        border-bottom: 1px solid #7B7B7B;

        &::after {
            content: '▼';
            margin-left: 0.5em;
            font-size: 0.75em;
            vertical-align: middle;
        }
    }

    .sidebar-news__category-list {
        margin-top: 1rem;
    }

    .sidebar-news__category-item {
        font-weight: 500;

        &.is-current a {
            color: var(--primary-color);
            font-weight: 700;
        }

        a {
            font-size: 1rem;

            &:hover {
                text-decoration: underline;
            }
        }
    }

    .sidebar-news__category-item+.sidebar-news__category-item {
        margin-top: 0.5rem;

        @media screen and (width <=600px) {
            margin-top: 0.75rem;
        }
    }

    @media screen and (width < 1024px) {
        max-width: 50%;
    }
}

/* ページネーションのスタイル（アーカイブページ）
   ========================================================================== */
.pagination {

    .nav-links {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 0.75rem;
    }
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    background: #fff;
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    color: var(--primary-color);
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s;

    @media screen and (width <=600px) {
        min-width: 1.75rem;
        height: 1.75rem;
        padding: 0 0.5rem;

    }
}

.pagination .page-numbers:hover {
    background-color: #f0f0f0;
}

.pagination .page-numbers.current {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.pagination .page-numbers.dots {
    border: none;
    background: transparent;
}


/* 投稿ページのスタイル
   ========================================================================== */
.single-news-content {
    padding-top: clamp(1.5rem, calc(-3.453rem + 13.208vw), 5rem);
    /* min: 24px, max: 80px */
}

.entry-header {
    .entry-category {
        display: inline-block;
        padding: 0 0.875rem;
        min-width: 7.5rem;
        text-align: center;
        color: #7B7B7B;
        font-size: clamp(0.625rem, calc(0.271rem + 0.943vw), 0.875rem);
        /* min: 10px, max: 14px */
        border: 1px solid #7B7B7B;
        border-radius: 100vw;

        @media screen and (width <=600px) {
            padding: 0.25rem 1.5rem;
            min-width: 3.5rem;
        }
    }

    .entry-title {
        margin-top: clamp(1rem, calc(0.292rem + 1.887vw), 1.5rem);
        /* min: 16px, max: 24px */
        margin-bottom: clamp(0.5rem, calc(-0.208rem + 1.887vw), 1rem);
        /* min: 8px, max: 16px */
        font-size: clamp(1.125rem, calc(0.241rem + 2.358vw), 1.75rem);
        /* min: 18px, max: 28px */
        font-weight: 500;
        letter-spacing: 0.1em;
    }

    .entry-date {
        font-family: var(--font-en);
        color: #7B7B7B;
        font-size: clamp(0.75rem, calc(0.396rem + 0.943vw), 1rem);
        /* min: 12px, max: 16px */
        letter-spacing: 0.1em;
    }
}


/* お知らせ投稿記事コンテンツのスタイル（投稿ページ）
   ========================================================================== */
.entry-content {
    margin-top: clamp(2rem, calc(-0.83rem + 7.547vw), 4rem);
    /* min: 32px, max: 64px */
    line-height: 1.8;
}

/* 段落 */
.entry-content p {
    margin: 2.5em 0;

    &:first-child {
        margin-top: 0;
    }

    &:last-child {
        margin-bottom: 0;
    }
}

/* 見出し */
.entry-content h2 {
    font-size: clamp(1rem, calc(0.292rem + 1.887vw), 1.5rem);
    /* min: 16px, max: 24px */
    font-weight: 700;
    margin: 2em 0 1em;
    padding-left: 0.75em;
    border-left: 4px solid var(--primary-color);
    color: var(--primary-color);
    letter-spacing: 0.05em;
}

.entry-content h3 {
    font-size: clamp(1rem, calc(0.646rem + 0.943vw), 1.25rem);
    /* min: 16px, max: 20px */
    font-weight: 700;
    margin: 1.5em 0 0.75em;
    padding-bottom: 0.5em;
    border-bottom: 2px solid #e0e0e0;
    letter-spacing: 0.05em;
}

.entry-content h4 {
    font-size: clamp(0.938rem, calc(0.672rem + 0.708vw), 1.125rem);
    /* min: 15px, max: 18px */
    font-weight: 700;
    margin: 1.5em 0 0.75em;
    letter-spacing: 0.05em;
}

.entry-content h5 {
    font-size: 1rem;
    font-weight: 700;
    margin: 1.25em 0 0.5em;
    letter-spacing: 0.05em;
}

.entry-content h6 {
    font-size: 0.875rem;
    font-weight: 700;
    margin: 1.25em 0 0.5em;
    letter-spacing: 0.05em;
}

/* 強調表現 */
.entry-content strong {
    font-weight: 700;
    color: var(--primary-color);
}

.entry-content em {
    font-style: italic;
}

.entry-content del {
    text-decoration: line-through;
    opacity: 0.7;
}

/* リンク */
.entry-content a {
    color: var(--primary-color);
    text-decoration: underline;
    transition: opacity 0.2s;
}

.entry-content a:hover {
    opacity: 0.7;
}

/* リスト */
.entry-content ul,
.entry-content ol {
    margin: 2em 0;
    padding-left: 2em;
}

.entry-content ul {
    list-style-type: disc;
}

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

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

.entry-content ul ul,
.entry-content ol ol,
.entry-content ul ol,
.entry-content ol ul {
    margin: 0.5em 0;
}

.entry-content ul ul {
    list-style-type: circle;
}

/* 引用 */
.entry-content blockquote {
    margin: 2.5em 0;
    padding: 1.5em 2em;
    background-color: #f5f5f5;
    border-left: 4px solid var(--primary-color);
    color: #666;
    font-style: italic;
}

.entry-content blockquote p {
    margin: 0;
}

.entry-content blockquote p+p {
    margin-top: 1em;
}

/* 画像 */
.entry-content img {
    max-width: min(680px, 100%);
    height: auto;
}

/* 区切り線 */
.entry-content hr {
    margin: 3em 0;
    border: none;
    border-top: 2px solid #e0e0e0;
}

/* テーブル */
.entry-content table {
    width: 100%;
    margin: 2.5em 0;
    border-collapse: collapse;
    border: 1px solid #e0e0e0;
}

.entry-content table th {
    padding: 0.75em 1em;
    background-color: var(--primary-color);
    color: var(--white-color);
    font-weight: 700;
    text-align: left;
    border: 1px solid var(--primary-color);
}

.entry-content table td {
    padding: 0.75em 1em;
    border: 1px solid #e0e0e0;
}

.entry-content table tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* レスポンシブ対応 */
@media (width <=768px) {

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

    .entry-content blockquote {
        padding: 1em 1.5em;
    }

    .entry-content table {
        font-size: 0.875rem;
    }

    .entry-content table th,
    .entry-content table td {
        padding: 0.5em 0.75em;
    }
}

/* 投稿のナビゲーション（投稿ページ）
   ========================================================================== */
.post-navigation {
    display: flex;
    gap: 20px;
    margin: 60px 0 40px;
    padding-top: 40px;
    border-top: 1px solid #e0e0e0;
}

.post-navigation .nav-links {
    display: flex;
    justify-content: space-between;
    width: 100%;
    gap: 20px;
    flex-wrap: wrap;
}

.post-navigation a {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    background: #f9f9f9;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    transition: background-color 0.2s;
    flex: 1;
    min-width: 200px;
}

.post-navigation a:hover {
    background-color: #e9e9e9;
}

.nav-subtitle {
    font-size: 12px;
    color: #999;
}

.nav-title {
    font-weight: bold;
}


/* アーカイブへ戻るリンク（投稿ページ）
   ========================================================================== */
.back-to-archive {
    margin-bottom: clamp(7.5rem, calc(3.962rem + 9.434vw), 10rem);
    /* min: 120px, max: 160px */
}

.back-to-archive__button {
    display: block;
    width: fit-content;
    min-width: 15rem;
    margin-inline: auto;
    margin-top: 5rem;
    padding: 0.875rem 3.75rem;
    background-color: var(--primary-color);
    color: var(--white-color);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    cursor: pointer;
    text-align: center;
    position: relative;


    &::after {
        content: '→';
        color: var(--white-color);
        position: absolute;
        top: 50%;
        right: 3rem;
        transform: translateY(-50%);
    }
}


/* 投稿がない場合のスタイル（アーカイブページ）
   ========================================================================== */
.no-posts {
    text-align: center;
    padding: 3.75rem 1.25rem;
    color: var(--primary-color);
}