:root {
    --corp_color: #009EF3;
    --ff_ja: YakuHanRP, "Zen Maru Gothic", sans-serif;
    --ff_en: YakuHanRP, "Zen Maru Gothic", sans-serif;
    /* --ff_ja: "M PLUS 1p", sans-serif;
    --ff_en: "M PLUS 1p", sans-serif; */
    --article-width: clamp(750px, 65vw, 960px);
    --base-width: clamp(850px, 65vw, 1200px);
    --header-width: clamp(750px, 65vw, 960px);
    --header-height: 85px;

    --text: #1e2f43;
    --bg: #f7f9fc;
    --surface: #ffffff;
    --muted: #556070;

    --border: rgba(15, 23, 42, 0.10);
    --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);

    --radius: 16px;
    --radius-sm: 10px;
    --container-pad: 16px;

    --news-category-info: #1935a5;
    --news-category-event: #ab1a1a;
    --news-category-parents: #0e8837;
    --news-category-uncategorized: #3d3d3d;

}

/* 基本設定 */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    display: flex;
    flex-direction: column;
    font-family: var(--ff_ja);
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
}

ul {
    padding-left: 0;
}

a {
    color: #007acc;
    text-decoration: none;
}

a:hover {
    opacity: 0.7;
}

p:empty {
    display: none;
}

/* メインメニュー */
.main-menu {
    display: flex;
    gap: 20px;
    list-style: none;
}

.main-menu li {
    display: inline-block;
}

.main-menu a {
    color: #333;
    text-decoration: none;
}

.main-menu a:hover {
    text-decoration: underline;
}

/* フッター */
footer {
    margin-top: auto;
    text-align: center;
    background: #eee;
}

.footer-nav-list {}

.footer-nav-item {
    display: inline-block;
    margin: 0 1rem;
}

/* ヘッダー */
header {
    position: sticky;
    top: 0;
    z-index: 990;
    width: 100%;
    background: rgba(255, 255, 255, 0.80);
    border-bottom: 5px solid var(--corp_color);
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    will-change: backdrop-filter;
}

header .header__inner {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(100%, var(--header-width));
    height: var(--header-height);
    margin: 0 auto;
    /* padding-left: 15px;
    padding-right: 15px; */
}

header h1 {
    font-size: 1.5rem;
}

header nav {
    margin-top: 5px;
}

.header__logo {
    display: flex;
    align-items: center;
    width: auto;
    height: 100%;
    /* fill: var(--corp_color); */
}

.header__logo svg {
    display: block;
    width: auto;
    height: calc(var(--header-height) - 15px);
}

.hamburger-menu__button,
.hamburger-menu__logo {
    display: none;
}

/* ナビゲーション */
.nav-list {
    display: flex;
}

.header-menu {
    box-sizing: border-box;
    display: flex;
    gap: 1.6rem;
    padding: 0;
    letter-spacing: -0.5px;
}

.header-menu+.header-menu {
    padding-left: 50px;
}

.nav-item {
    list-style: none;
}

.nav-item a {
    position: relative;
    display: block;
    margin: 8px 0;
    color: unset;
    font-weight: 900;
    text-decoration: none;
}

.nav-item a::before {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 70%;
    height: 3px;
    border-radius: 2px;
    background: #00b0ff;
    opacity: 0.25;
    transform: translateX(-50%);
    transition: width 0.25s ease, opacity 0.25s ease, background 0.25s ease;
}

.nav-item:not(.active) a:hover::before {
    width: 85%;
    opacity: 0.6;
}

.nav-item.active a::before {
    width: 75%;
    background: #ffa400;
    opacity: 1;
}

.nav-item.active a:hover::before {
    width: 90%;
}

/* アーカイブ・共通見出し */
.archive-box {
    width: var(--article-width);
    margin: 0 auto 3rem;
    padding: 2rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* 記事一覧・ニュース一覧の見出し(トップページ・一覧ページ兼用) */
main h2.c-heading__ja {
    padding: 10px 0;
    color: #007acc;
    border-bottom: 1px solid #9BC1DF;
}

/* お知らせ・過去のお知らせ一覧関連 */
ul.news__list {
    display: grid;
    padding-left: 0;
    /* gap: 0.75rem; */
}

ul.news__list>li {
    padding: 1.25rem 0.5rem;
    list-style-type: none;
    word-break: break-word;
    border-bottom: 1px dotted #5c707f;
}

.news__list a {
    text-decoration: none;
    transition: opacity 0.1s ease;
}

.news__list a:hover {
    opacity: 0.7;
}

/* 1行のレイアウト */
.newsWrap {
    display: grid;
    grid-template-columns: 4rem 7rem minmax(0, 1fr);
    align-items: center;
    column-gap: 1.5rem;
    row-gap: 0.5rem;
    text-align: justify;
}

/* 日付 */
.newsWrap__date {
    font-size: 0.9rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* 記事タイトル */
.newsWrap__title {
    min-width: 0;
    margin: 0;
    text-wrap: inherit;
    line-height: 1.3;
}

/* カテゴリ */
.newsWrap__category {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    margin: 0;
    padding: 5px;

    border: 2px solid #000;
    border-radius: 0.45rem;

    font-size: 0.9rem;
    line-height: 1.4;
    text-align: center;
    font-weight: 700;
}

.newsWrap__category--info {
    color: var(--news-category-info);
    border-color: var(--news-category-info);
}

.newsWrap__category--event {
    color: var(--news-category-event);
    border-color: var(--news-category-event);
}

.newsWrap__category--parents {
    color: var(--news-category-parents);
    border-color: var(--news-category-parents);
}

.newsWrap__category--uncategorized {
    color: var(--news-category-uncategorized);
    border-color: var(--news-category-uncategorized);
}

.news_indiv {
    word-break: break-word;
}



/* ==========================================
 * 記事カード（TOP・記事一覧共通）
 * ========================================== */

ul.articles__list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 1rem;
    row-gap: 1.5rem;
    margin: 1.5rem 0 2rem;
    padding: 0;
    list-style: none;
}

ul.articles__list>li {
    position: relative;
    min-width: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    background: #fff;
    border: 1px solid #dce7f1;
    border-radius: 12px;
    overflow: hidden;
    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

ul.articles__list>li::after {
    content: none !important;
}

ul.articles__list>li:hover {
    transform: translateY(-3px);
    border-color: #9bc1df;
    box-shadow: 0 8px 22px rgba(0, 80, 140, 0.10);
}

/* カード全体をリンクにする */
ul.articles__list>li>a {
    display: block;
    height: 100%;
    color: var(--text);
    text-decoration: none;
}

ul.articles__list>li>a:hover {
    opacity: 1;
}

.articlesWrap {
    display: flex;
    flex-direction: column;
    height: 100%;
    margin: 0;
}

/* アイキャッチ画像 */
.articles__img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    object-position: center;
}

/* テキスト部分 */
.articlesWrap__content {
    padding: 1rem;
    margin: 0;
}

.articlesWrap__date {
    margin: 0 0 0.4rem;
    color: #68798a;
    font-size: 0.8rem;
}

.articlesWrap__title {
    margin: 0 0 0.6rem;
    color: #20364a;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.articlesWrap__text {
    margin: 0;
    color: #667788;
    font-size: 0.85rem;
    line-height: 1.7;
    text-align: justify;
    word-break: break-all;
}

/* NEWラベル */
.articles__new {
    position: absolute;
    z-index: 1;
    margin: 0;
    padding: 0.2rem 0.7rem;
    color: #fff;
    background: #ff8316;
    border-radius: 5px;
    font-size: 0.75rem;
    font-weight: 700;
}

.trim-image-to-circle {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background-position: center center;
    /* 横長画像の左上を基準に表示 */
}

/* タブレット */
@media screen and (max-width: 1399.98px) {
    .header__logo {
        width: 190px;
    }

    .header-menu {
        gap: 1.2rem;
    }

    .nav-item a {
        font-size: 92.5%;
        top: 2px;
        letter-spacing: -0.05em;
    }

    .nav-item a::before {
        bottom: -7px;
        height: 5px;
        border-radius: 5px;
    }
}

@media screen and (max-width: 1199.98px) {
    .header__logo {
        width: 180px;
    }
}

/* ==========================================
 * スマートフォン
 * ========================================== */

@media screen and (max-width: 767.98px) {
    body {
        font-size: unset;
    }

    /* 一覧 */
    .archive-box {
        width: 95vw;
    }

    ul.news__list {
        margin-top: 0.5rem;
    }

    .news_indiv {
        margin-bottom: 0.5rem;
    }

    .newsWrap {
        /* grid-template-columns: 7rem 7rem; */
        column-gap: 0.75rem;
        row-gap: 0.65rem;
    }

    .newsWrap__category {
        padding: 3px;
        font-size: 0.8rem;
    }

    .newsWrap__title {
        grid-column: 1 / -1;
    }

    ul.articles__list {
        grid-template-columns: minmax(0, 1fr);
        gap: 1rem;
    }

    /* ヘッダー・ナビゲーション */
    header {
        top: 0;
        right: 0;
        left: unset;
        width: unset;
        height: unset;
        padding: 5px 15px;
        background: transparent;
        /* position: fixed; */
    }

    header nav {
        margin: 0;
    }

    .header__logo {
        left: unset;
        width: 30vh;
        opacity: 1;
        transition: opacity 0.6s ease;
        /* position: fixed; */
    }

    .header__logo.show {
        opacity: 1;
    }

    /* ハンバーガーメニューの MENU テキスト */
    .menu-text {
        position: absolute;
        bottom: 20px;
        font-size: 12px;
        font-weight: bold;
        opacity: 1;
        transition: opacity 0.3s ease;
    }

    /* ハンバーガーメニュー */
    .hamburger-menu__button {
        z-index: 999;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        width: 65px;
        height: 65px;
        appearance: none;
        cursor: pointer;
        background-color: #fff;
        border-radius: 10px;
    }

    .hamburger-menu__button-mark {
        position: relative;
        bottom: 5px;
        display: block;
        width: 40px;
        height: 2px;
        background-color: black;
        transition: 0.3s;
    }

    /* 展開時 ≡ ⇒ ✕ */
    #hamburger:checked~.hamburger-menu__button .hamburger-menu__button-mark:nth-of-type(1) {
        width: 23px;
        transform: translate(4px, -5px) rotate(45deg);
        transform-origin: 0%;
    }

    #hamburger:checked~.hamburger-menu__button .hamburger-menu__button-mark:nth-of-type(2) {
        width: 23px;
        transform: translate(4px, 4px) rotate(-45deg);
        transform-origin: 0%;
    }

    .menu-text.menu-text__close {
        opacity: 0;
        pointer-events: none;
    }

    #hamburger:checked~.hamburger-menu__button .menu-text.menu-text__close {
        opacity: 1;
        pointer-events: auto;
    }

    #hamburger:checked~.hamburger-menu__button .menu-text.menu-text__open {
        opacity: 0;
        pointer-events: none;
    }

    .hamburger-menu__logo {
        display: block;
        width: 80%;
        margin: 20px auto 50px;
        padding-bottom: 1rem;
        text-align: center;
        border-bottom: 2px solid rgba(255, 255, 255, 0.4);
    }

    /* フルスクリーンメニュー項目 */
    .nav-list {
        position: fixed;
        top: 0;
        left: 0;
        z-index: 998;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 100vh;
        padding: 40px 0;
        background: rgba(43, 144, 238, 0.85);
        opacity: 0;
        visibility: hidden;
        backdrop-filter: blur(5px);
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    #hamburger:checked~.nav-list {
        opacity: 1;
        visibility: visible;
    }

    .header-menu {
        flex-direction: column;
        gap: 1.5rem;
        margin: 0;
    }

    .nav-item {
        font-size: clamp(1.6rem, 5vw, 2rem);
        transition: all 0.4s ease;
    }

    #hamburger:checked~.nav-list .nav-item {
        opacity: 1;
        transform: translateY(0);
    }

    .nav-item a {
        color: white;
        font-size: clamp(1.6rem, 5vw, 2rem);
        font-weight: bold;
        text-align: center;
    }

    .nav-item a::before {
        bottom: 2px;
    }

    .nav-item.nav-active {
        width: 30%;
    }

    .nav-item a:hover::before {
        width: 60%;
    }

    .footer-nav-item {
        display: block;
        margin: 0.5rem 1rem;
    }

    /* 新着記事 */
    ul.articles__list>li {
        border: 1px solid #dce7f1;
    }

    .articlesWrap__content {
        padding: 1rem;
    }

    .articles__img {
        aspect-ratio: 16 / 9;
    }
}

.sp-only {
    display: none;
}

@media screen and (max-width: 767.98px) {
    .sp-only {
        display: unset;
    }
}

/* ホバーアニメーションを抑制する環境への対応 */
@media (prefers-reduced-motion: reduce) {
    ul.articles__list>li {
        transition: none;
    }
}