@charset "UTF-8";

/* ==========================================================================
   お知らせ一覧
   記事カードは style.css の .news-main-item
   サイドバー（.c-sidebar）はお知らせ詳細でも同じマークアップを読み込む
   アーカイブの開閉は access.css のルート図アコーディオンと同じ仕組み
   ========================================================================== */

.p-news-index {
  position: relative;
  padding: 100px 20px 0;
}

.p-news-index__line {
  position: absolute;
  top: 0;
  left: 50%;
  width: 1px;
  height: 52px;
  background-color: var(--color-text);
  transform: translateX(-50%);
}

.p-news-index__layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(362px, 100%);
  margin-inline: auto;
}

.p-news-main {
  display: flex;
  flex-direction: column;
  gap: 28px;
  width: 100%;
}

.p-news-main__heading {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.p-news-main__title {
  font-size: 1.125rem;
  font-weight: var(--fw-medium);
  line-height: 1;
}

.p-news-main__count {
  font-size: var(--fs-text-md);
  font-weight: var(--fw-regular);
  line-height: 1;
}

.p-news-main__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 52px;
}

.p-news-index .news-main {
  width: 100%;
}

.p-news-index .news-main-item:first-child {
  border-top: 1px solid var(--color-border);
}

.p-news-index .news-main-item__thumb {
  aspect-ratio: 124 / 75.37;
  object-fit: cover;
  background-color: var(--color-bg);
}

.p-news-index .news-main-item__title {
  text-align: justify;
}

.p-news-index .news-main-item__link {
  background-color: transparent;
  transition: background-color 0.3s ease;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.p-news-title-more {
  display: none;
}

/* ページ送り。WordPress の .navigation.pagination > .nav-links > .page-numbers */
.c-pager {
  width: 100%;
}

.c-pager .nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 21px;
}

.c-pager__numbers {
  display: flex;
  align-items: center;
  gap: 21px;
}

.c-pager .page-numbers {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--color-text);
  font-size: var(--fs-button);
  font-weight: var(--fw-medium);
  line-height: 1;
}

.c-pager .page-numbers.current {
  color: var(--color-white);
  background-color: var(--color-text);
}

.c-pager .prev,
.c-pager .next {
  width: auto;
  height: auto;
  border: 0;
  background: none;
}

.c-pager__icon {
  display: block;
  width: 15px;
  height: 14px;
}

/* ==========================================================================
   c-sidebar（最新記事・カテゴリ・アーカイブ）
   ========================================================================== */

.c-sidebar {
  display: flex;
  flex-direction: column;
  gap: 65px;
  width: 100%;
  margin-top: 120px;
}

.c-sidebar__block {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.c-sidebar__title {
  font-size: 1.125rem;
  font-weight: var(--fw-medium);
  line-height: 1;
}

.c-sidebar__latest-link,
.c-sidebar__category-link {
  border-bottom: 1px solid var(--color-border);
}

.c-sidebar__latest-item:first-child .c-sidebar__latest-link,
.c-sidebar__category-item:first-child .c-sidebar__category-link,
.c-sidebar__year:first-child .c-sidebar__year-btn {
  border-top: 1px solid var(--color-border);
}

.c-sidebar__latest-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 24px 0;
  background-color: transparent;
  font-size: var(--fs-text-md);
  font-weight: var(--fw-medium);
  line-height: 1.4;
  transition: background-color 0.3s ease;
}

.c-sidebar__chevron {
  flex: none;
  width: 15px;
  height: 15px;
  background: url("../img/common-icon-chevron-right-black.svg") center / contain no-repeat;
}

.c-sidebar__chevron--sm {
  width: 12px;
  height: 12px;
}

.c-sidebar__category-link {
  display: flex;
  align-items: center;
  padding: 24px 20px;
  background-color: transparent;
  font-size: var(--fs-text-md);
  font-weight: var(--fw-medium);
  line-height: 1.4;
  transition: background-color 0.3s ease;
}

.c-sidebar__year-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 24px 20px;
  border: 0;
  border-bottom: 1px solid var(--color-border);
  color: inherit;
  background-color: transparent;
  transition: background-color 0.3s ease;
  font: inherit;
  font-size: var(--fs-text-md);
  font-weight: var(--fw-medium);
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
}

.c-sidebar__months {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px 0 20px 30px;
  border-bottom: 1px solid var(--color-border);
}

.c-sidebar__month-link {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: -4px -8px;
  padding: 4px 8px;
  border-radius: 4px;
  background-color: transparent;
  font-size: 0.8125rem;
  font-weight: var(--fw-medium);
  line-height: 1;
  transition: background-color 0.3s ease;
}

@media (hover: hover) {
  .p-news-index .news-main-item__link:hover,
  .c-sidebar__latest-link:hover,
  .c-sidebar__category-link:hover,
  .c-sidebar__year-btn:hover,
  .c-sidebar__month-link:hover {
    background-color: rgba(237, 235, 229, 0.5);
  }
}

/* 開閉は access.css の .p-access-route と同じ grid アニメーション */
.c-sidebar .p-access-route__toggle {
  position: static;
  transform: none;
}

.c-sidebar .p-access-route__icon {
  position: relative;
  display: block;
  flex: none;
  width: 11px;
  height: 11px;
}

.c-sidebar .p-access-route__icon::before,
.c-sidebar .p-access-route__icon::after {
  content: "";
  position: absolute;
  top: 5px;
  left: 0;
  box-sizing: content-box;
  width: 100%;
  height: 0;
  border-top: 1px solid currentColor;
  background: none;
  transition:
    transform 0.4s var(--ease-out),
    opacity 0.4s var(--ease-out);
}

.c-sidebar .p-access-route__icon::before {
  transform: rotate(0deg);
}

.c-sidebar .p-access-route__icon::after {
  transform: rotate(90deg);
}

.c-sidebar .p-access-route.is-open .p-access-route__icon::after {
  opacity: 0;
  transform: rotate(0deg);
}

.c-sidebar .p-access-route__rest {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 0.45s var(--ease-out);
}

.c-sidebar .p-access-route__rest-inner {
  min-height: 0;
  overflow: hidden;
}

.js .c-sidebar .p-access-route:not(.is-open) .p-access-route__rest {
  grid-template-rows: 0fr;
}

/* 1000px以下は一覧とサイドバーだけSPの1カラム。
   ヒーローは lower.css の 769px 切り替えのまま */
@media (max-width: 1000px) {
  .p-news-index__layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: min(620px, 100%);
    margin-inline: auto;
  }

  .p-news-index .news-main-item__link {
    gap: var(--space-20);
    padding: var(--space-20) 0;
  }

  .p-news-index .news-main-item__thumb {
    width: 124px;
    aspect-ratio: 124 / 75.37;
  }

  .p-news-index .news-main-item__inner {
    padding-inline: 0;
  }

  .p-news-index .news-main-item__body {
    gap: var(--space-12);
  }

  .p-news-index .news-main-item__meta,
  .p-news-index .news-main-item__category {
    gap: 10px;
    line-height: var(--lh-heading);
  }

  .p-news-index .news-main-item__meta {
    font-size: 0.75rem;
  }

  .p-news-index .news-main-item__title {
    max-width: none;
    font-size: 0.875rem;
    line-height: var(--lh-snug);
  }
}

@media (min-width: 500px) and (max-width: 1000px) {
  .p-news-index {
    padding-inline: clamp(20px, 5vw, 40px);
  }
}

@media (min-width: 769px) {
  .p-news-index {
    padding: 120px clamp(40px, 5.56vw, 80px) 0;
  }

  .p-news-index__line {
    height: 74px;
  }
}

@media (min-width: 1001px) {
  .p-news-index__layout {
    display: grid;
    grid-template-columns: minmax(0, 908px) 284px;
    column-gap: clamp(32px, 6.11vw, 88px);
    align-items: start;
    justify-content: center;
    width: min(1280px, 100%);
  }

  .p-news-main {
    gap: 60px;
  }

  .p-news-main__heading {
    gap: 20px;
  }

  .p-news-main__title {
    font-size: 1.5rem;
  }

  .p-news-main__count {
    font-size: 0.9375rem;
  }

  .p-news-main__content {
    gap: 77px;
  }

  .p-news-title-more {
    display: inline;
  }

  .p-news-index .news-main-item__title {
    max-width: 485px;
  }

  .p-news-index .news-main-item__thumb {
    aspect-ratio: 275 / 180;
  }

  .c-pager .nav-links {
    gap: 15px;
  }

  .c-pager__numbers {
    gap: 18px;
  }

  .c-pager .page-numbers {
    width: 28px;
    height: 28px;
    font-size: 0.8125rem;
  }

  .c-sidebar {
    gap: 88px;
    margin-top: 0;
  }

  .c-sidebar__title {
    font-size: 1.25rem;
  }

  .c-sidebar__months {
    gap: 12px;
    padding-block: 16px;
  }

  .c-sidebar__month-link {
    font-size: 0.75rem;
  }
}

/* ==========================================================================
   お知らせ詳細
   2カラムと1000px以下の幅制限は .p-news-index を共用
   ========================================================================== */

.p-news-single {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
}

.p-news-single__header {
  display: flex;
  flex-direction: column;
  align-self: flex-start;
  align-items: flex-start;
  gap: 16px;
  width: 100%;
  margin-left: 0;
  margin-right: auto;
  text-align: left;
}

.p-news-single__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8125rem;
  font-weight: var(--fw-medium);
  line-height: 1;
}

.p-news-single__category {
  display: flex;
  align-items: center;
  gap: 10px;
}

.p-news-single__category::before {
  content: "";
  width: var(--border-thin);
  height: 12px;
  background-color: var(--color-text);
}

.p-news-single__title {
  font-size: 1.125rem;
  font-weight: var(--fw-medium);
  line-height: 1.4;
  text-align: left;
}

.entry-content {
  display: flow-root;
  width: 100%;
  padding: 42px 0 52px 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: 1.8;
  text-align: justify;
  overflow-wrap: break-word;
}

/* ブロック間・段落間の余白は下側に付け、最後の要素だけ 0 にする（1.8em = 本文1行分） */
.entry-content > * {
  margin: 0 0 1.8em;
}

.entry-content p {
  margin: 0 0 1.8em;
}

.entry-content > :last-child,
.entry-content p:last-child {
  margin-bottom: 0;
}

.entry-content > figure,
.entry-content > .entry-content__media,
.entry-content > .wp-block-image {
  margin-top: 40px;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
  font-weight: var(--fw-medium);
  line-height: 1.4;
  text-align: left;
}

.entry-content h2 {
  font-size: 1.25rem;
}

.entry-content h3 {
  font-size: 1.125rem;
}

.entry-content h4 {
  font-size: 1rem;
}

.single-post .entry-content > :is(h2, h3, h4):not(:last-child) {
  margin-bottom: 1.2em;
}

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

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

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

.entry-content li + li {
  margin-top: 0.4em;
}

.entry-content blockquote {
  padding-left: 1.25em;
  border-left: 1px solid var(--color-border);
  text-align: left;
}

.entry-content img,
.entry-content video,
.entry-content iframe {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ブロックエディタの配置（中央・左右寄せ）とキャプション */
.entry-content .aligncenter,
.entry-content .aligncenter img {
  margin-inline: auto;
}

.entry-content .alignleft {
  float: left;
  max-width: 50%;
  margin: 0.4em 1.5em 1em 0;
}

.entry-content .alignright {
  float: right;
  max-width: 50%;
  margin: 0.4em 0 1em 1.5em;
}

@media (max-width: 768px) {
  .entry-content .alignleft,
  .entry-content .alignright {
    float: none;
    max-width: 100%;
    margin-inline: 0;
  }
}

.entry-content .alignwide,
.entry-content .alignfull {
  width: 100%;
  max-width: 100%;
}

.entry-content figcaption {
  margin-top: 8px;
  color: var(--color-text-sub);
  font-size: 0.8125rem;
  line-height: 1.6;
  text-align: center;
}

.entry-content .has-text-align-center {
  text-align: center;
}

.entry-content .has-text-align-right {
  text-align: right;
}

/* お知らせ詳細の本文リンク（ボタン系のリンクは除外） */
.single-post .entry-content a {
  text-decoration: underline;
  text-underline-offset: 0.2em;
  transition: opacity 0.3s ease;
}

.single-post .entry-content a:is(.wp-block-button__link, .wp-element-button, .btn, .btn-readmore, .c-btn) {
  text-decoration: none;
}

/* 本文内ボタンはテキストリンクより控えめに透過させる */
.single-post .entry-content :is(.wp-block-button__link, .c-btn) {
  transition: opacity 0.3s ease;
}

@media (hover: hover) {
  .single-post .entry-content a:not(.wp-block-button__link, .wp-element-button, .btn, .btn-readmore, .c-btn):hover {
    opacity: 0.7;
  }

  .single-post .entry-content :is(.wp-block-button__link, .c-btn):hover {
    opacity: 0.88;
  }
}

.entry-content__media {
  background-color: #afafaf;
  min-height: 208px;
}

.entry-content__media:has(img) {
  min-height: 0;
  background-color: transparent;
}

.entry-content__media img {
  width: 100%;
}

.p-news-single__nav {
  width: 100%;
}

.p-news-single__nav .nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 28px;
}

.p-news-single__prev,
.p-news-single__next {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  font-size: 0.875rem;
  font-weight: var(--fw-medium);
  line-height: 1;
  white-space: nowrap;
}

.p-news-single__prev.is-disabled,
.p-news-single__next.is-disabled {
  visibility: hidden;
}

.p-news-single__back {
  display: grid;
  place-items: center;
  width: 124px;
  height: 36px;
  color: var(--color-white);
  background-color: var(--color-text);
  font-size: 0.875rem;
  font-weight: var(--fw-medium);
  line-height: 1;
  white-space: nowrap;
}

.p-news-single__label--short {
  display: none;
}

@media (max-width: 499px) {
  .p-news-single__label--full {
    display: none;
  }

  .p-news-single__label--short {
    display: inline;
  }

  .p-news-single__nav .nav-links {
    flex-wrap: nowrap;
    gap: 24px;
  }

  .p-news-single__prev,
  .p-news-single__next {
    gap: 6px;
    padding: 10px 0;
    font-size: 15px;
  }

  .p-news-single__back {
    width: auto;
    height: 40px;
    padding: 0 16px;
    font-size: 15px;
  }
}

@media (min-width: 1001px) {
  .p-news-single {
    gap: 24px;
  }

  .p-news-single__header {
    gap: 16px;
  }

  .p-news-single__meta,
  .p-news-single__category {
    gap: 20px;
  }

  .p-news-single__category::before {
    background-color: var(--color-border);
  }

  .p-news-single__title {
    font-size: 1.4rem;
  }

  .entry-content {
    padding: 64px 0;
    font-size: 0.9375rem;
    font-weight: var(--fw-regular);
    text-align: left;
  }

  .entry-content > figure,
  .entry-content > .entry-content__media,
  .entry-content > .wp-block-image {
    margin-top: 60px;
  }

  .entry-content__media {
    min-height: 522px;
  }

  .p-news-single__nav .nav-links {
    gap: 32px;
  }

  .p-news-single__prev,
  .p-news-single__next {
    gap: 8px;
    font-size: 0.8125rem;
  }

  .p-news-single__back {
    width: 121px;
    height: 28px;
    font-size: 0.8125rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .c-sidebar .p-access-route__rest,
  .c-sidebar .p-access-route__icon::before,
  .c-sidebar .p-access-route__icon::after {
    transition: none;
  }
}
