/* =========================================================
   お知らせ（一覧・詳細）と協会商品の詳細（2026-10 新デザイン）
   SP が基準、768px・1200px で上書き。
   ========================================================= */

/* --- 配置（ページブロック） ------------------------------ */

.orwa-news-archive__body {
  padding: 5.5rem 0.9375rem 0;
}

.orwa-news-single,
.orwa-products-single {
  padding: 5.5rem 0.9375rem 0;
}

.orwa-news-single__body,
.orwa-products-single__body {
  max-width: var(--orwa-w-article);
  margin-inline: auto;
}

/* --- お知らせ一覧 ---------------------------------------- */

/* 左右のヤシの葉は一覧の擬似要素で敷く（書き出し画像はフレーム端で切れた見えている部分） */
.orwa-news-index {
  position: relative;
  isolation: isolate;
  overflow-x: clip;
}

.orwa-news-index::before,
.orwa-news-index::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  animation: orwa-leaf-sway 6s ease-in-out infinite alternate;
}

.orwa-news-index::before {
  top: 3.21875rem;
  left: 0;
  width: 8.275rem;
  aspect-ratio: 132.4 / 273.5;
  background: url(../img/common/leaf-left.png) right top / 12.16625rem auto no-repeat;
  transform-origin: left bottom;
}

.orwa-news-index::after {
  top: 6.28125rem;
  right: 0;
  width: 6.9375rem;
  aspect-ratio: 111 / 220;
  background:
    url(../img/common/leaf-right-1.png) left top / 10.0375rem auto no-repeat,
    url(../img/common/leaf-right-2.png) left 0.375rem top 4.12875rem / 9.6625rem auto no-repeat;
  transform-origin: right bottom;
  animation-delay: -3s;
}

/* 見出し：筆記体の「News」を後ろに重ねる */
.orwa-news-index__title {
  position: relative;
  margin: 0;
  padding-top: 2.89375rem;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
}

.orwa-news-index__title::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  z-index: -1;
  width: 8.33125rem;
  aspect-ratio: 191 / 103;
  background: url(../img/common/title-news.svg) center / contain no-repeat;
  translate: -50% 0;
}

.orwa-news-index__filter {
  margin-top: 2.5rem;
}

.orwa-news-index__box {
  margin-top: 1.25rem;
  padding: 1.25rem 1.25rem 2.5rem;
  background: var(--orwa-c-white);
}

.orwa-news-index__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.orwa-news-index__item + .orwa-news-index__item {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--orwa-c-line);
}

.orwa-news-index__empty {
  margin: 0;
  text-align: center;
}

.orwa-news-index__pager {
  margin-top: 2.5rem;
}

/* --- Archive（年の選択） --------------------------------- */

.orwa-news-year {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.625rem;
}

.orwa-news-year__label {
  font-family: "Cormorant Garamond", serif;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
}

.orwa-news-year__field {
  position: relative;
  width: 8.875rem;
}

.orwa-news-year__field::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 1.375rem;
  width: 0.375rem;
  aspect-ratio: 7 / 12;
  background: var(--orwa-c-navy);
  mask: url(../img/common/icon-chevron.svg) center / contain no-repeat;
  translate: 0 -50%;
  rotate: 90deg;
  pointer-events: none;
}

.orwa-news-year__select {
  width: 100%;
  padding: 0.5rem 2.5rem 0.5rem 1.25rem;
  border: 1px solid var(--orwa-c-line);
  border-radius: 3.125rem;
  background: var(--orwa-c-white);
  color: var(--orwa-c-navy);
  font: inherit;
  font-size: 0.75rem;
  line-height: 1.2;
  appearance: none;
  cursor: pointer;
}

/* --- お知らせの 1 行 ------------------------------------- */

.orwa-news-row {
  display: flex;
  flex-direction: column;
  gap: 0.1875rem;
  color: var(--orwa-c-navy);
  line-height: 1.2;
  text-decoration: none;
}

.orwa-news-row__meta {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.orwa-news-row__date {
  color: var(--orwa-c-gray);
  font-size: 0.75rem;
}

.orwa-news-row__cat {
  min-width: 4.5rem;
  padding: 0.25rem 0.9375rem;
  border: 1px solid var(--orwa-c-gray);
  border-radius: 0.375rem;
  color: var(--orwa-c-gray);
  font-size: 0.625rem;
  text-align: center;
  white-space: nowrap;
}

/* タイトルは SP 2 行・768px〜 1 行で「…」 */
.orwa-news-row__title {
  position: relative;
  display: -webkit-box;
  padding-left: 0.5625rem;
  overflow: hidden;
  font-size: 0.875rem;
  font-weight: var(--orwa-fw-medium);
  line-height: 1.43;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.orwa-news-row__title::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 0.25rem;
  aspect-ratio: 7 / 12;
  background: currentColor;
  mask: url(../img/common/icon-chevron.svg) center / contain no-repeat;
  translate: 0 -50%;
}

.orwa-news-row:hover .orwa-news-row__title,
.orwa-news-row:focus-visible .orwa-news-row__title {
  color: var(--orwa-c-blue);
}

/* --- ページ送り ------------------------------------------ */

.orwa-news-pager__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.orwa-news-pager .page-numbers {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.4375rem;
  border-radius: 0.5rem;
  color: var(--orwa-c-navy);
  font-family: var(--orwa-ff-en);
  font-size: 1rem;
  line-height: 1;
  text-decoration: none;
}

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

.orwa-news-pager .page-numbers.dots {
  padding-inline: 0.25rem;
  font-weight: 700;
  line-height: 1.4;
}

.orwa-news-pager :is(.prev, .next).page-numbers {
  font-family: var(--orwa-ff-sans);
  line-height: 1.2;
}

.orwa-news-pager .prev.page-numbers::before,
.orwa-news-pager .next.page-numbers::after {
  content: "";
  width: 0.5rem;
  aspect-ratio: 8 / 12;
  background: currentColor;
  mask: url(../img/common/icon-chevron.svg) center / contain no-repeat;
}

.orwa-news-pager .prev.page-numbers::before {
  rotate: 180deg;
}

/* SP は「前へ」「次へ」を読み上げだけに残し、矢印で 1 行に収める */
.orwa-news-pager__label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.orwa-news-pager .page-numbers.is-disabled {
  color: var(--orwa-c-gray);
  opacity: 0.5;
}

.orwa-news-pager a.page-numbers:hover {
  color: var(--orwa-c-blue);
}

/* --- 詳細の白い箱（お知らせ・協会商品の共通） ------------ */

.orwa-detail {
  padding: 2.5rem 0.9375rem;
  background: var(--orwa-c-white);
}

.orwa-detail__meta {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin: 0;
  line-height: 1.2;
}

.orwa-detail__date {
  color: var(--orwa-c-gray);
  font-size: 0.8125rem;
}

.orwa-detail__cat {
  min-width: 5.625rem;
  padding: 0.25rem 1.25rem;
  border: 1px solid var(--orwa-c-gray);
  border-radius: 0.375rem;
  color: var(--orwa-c-gray);
  font-size: 0.75rem;
  text-align: center;
  white-space: nowrap;
}

.orwa-detail__title {
  margin: 1rem 0 0;
  padding-bottom: 1.875rem;
  border-bottom: 2px solid var(--orwa-c-link);
  color: var(--orwa-c-link);
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.273;
}

.orwa-detail__title:first-child {
  margin-top: 0;
}

.orwa-detail__thumb {
  margin: 1.875rem 0 0;
}

.orwa-detail__thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 800 / 495;
  object-fit: cover;
}

/* --- 本文（the_content）：クラスを振れないため本文ラッパーの中で当てる --- */

.orwa-detail__content {
  margin-top: 2.5rem;
  overflow-wrap: anywhere;
}

.orwa-detail__content :is(h2, h3, h4, h5, h6, p, ul, ol, dl, table, figure, blockquote, pre) {
  margin: 1.25rem 0 0;
}

.orwa-detail__content h2 {
  margin-top: 2.5rem;
}

.orwa-detail__content h3 {
  margin-top: 2.5rem;
  padding-bottom: 0.8125rem;
  background:
    linear-gradient(var(--orwa-c-blue), var(--orwa-c-blue)) left bottom / 1.55rem 3px no-repeat,
    linear-gradient(var(--orwa-c-line-light), var(--orwa-c-line-light)) left bottom / 100% 3px no-repeat;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.44;
}

.orwa-detail__content h2 + h3 {
  margin-top: 1.25rem;
}

.orwa-detail__content h4 {
  position: relative;
  padding-left: 0.875rem;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.6;
}

.orwa-detail__content h4::before {
  content: "";
  position: absolute;
  top: 0.3125rem;
  left: 0;
  width: 0.25rem;
  aspect-ratio: 4 / 20;
  background: var(--orwa-c-blue);
}

.orwa-detail__content :is(h2, h3, h4, h5, h6, p, ul, ol, dl, table, figure, blockquote, pre):first-child {
  margin-top: 0;
}

.orwa-detail__content a {
  color: var(--orwa-c-link);
  text-decoration: underline;
}

.orwa-detail__content ul {
  padding: 0;
  list-style: none;
}

.orwa-detail__content ul > li {
  position: relative;
  padding-left: 1.75rem;
}

.orwa-detail__content ul > li::before {
  content: "";
  position: absolute;
  top: 0.75rem;
  left: 0.5rem;
  width: 0.375rem;
  aspect-ratio: 1;
  background: var(--orwa-c-link);
}

.orwa-detail__content ol {
  padding-left: 1.5em;
}

.orwa-detail__content li + li {
  margin-top: 0.5rem;
}

/* 料金表など：左の見出しセル＋右の値。行の下に 3px の線（見出しセルの下だけ色付き） */
.orwa-detail__content table {
  width: 100%;
  border-collapse: collapse;
}

.orwa-detail__content :is(th, td) {
  padding-block: 0.9375rem;
  border-bottom: 3px solid var(--orwa-c-line);
  line-height: 1.45;
  text-align: left;
  vertical-align: top;
}

.orwa-detail__content tr:first-child > :is(th, td) {
  padding-top: 0;
}

.orwa-detail__content th {
  width: 7.5rem;
  padding-inline: 0.625rem;
  background: linear-gradient(var(--orwa-c-table-head), var(--orwa-c-table-head)) left bottom / 76.92% 3px no-repeat border-box;
  color: var(--orwa-c-table-head);
  font-weight: var(--orwa-fw-medium);
}

.orwa-detail__content td {
  padding-inline: 0.9375rem 0;
}

/* --- 前後の記事・一覧へ戻る ------------------------------ */

.orwa-detail__nav {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--orwa-c-line);
}

.orwa-detail__adjacent {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0;
  padding: 0;
  list-style: none;
  line-height: 1.2;
}

.orwa-detail__adjacent-item--next {
  grid-column: 2;
  justify-self: end;
}

.orwa-detail__adjacent-link {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--orwa-c-navy);
  font-size: 0.875rem;
  text-decoration: none;
}

.orwa-detail__adjacent-item--prev .orwa-detail__adjacent-link {
  color: var(--orwa-c-gray);
}

.orwa-detail__adjacent-item .orwa-detail__adjacent-link:hover,
.orwa-detail__adjacent-item .orwa-detail__adjacent-link:focus-visible {
  color: var(--orwa-c-blue);
}

.orwa-detail__arrow {
  font-size: 1rem;
}

.orwa-detail__back {
  margin: 1.5rem 0 0;
  line-height: 1.2;
  text-align: center;
}

.orwa-detail__back:first-child {
  margin-top: 0;
}

.orwa-detail__back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  color: #000;
  font-size: 0.875rem;
  text-decoration: none;
}

.orwa-detail__back-arrow {
  color: var(--orwa-c-navy);
  font-family: var(--orwa-ff-en);
  font-size: 1rem;
}

/* 協会商品の詳細：線なしで本文の下に置く */
.orwa-detail__back.orwa-detail__back--solo {
  margin-top: 2.5rem;
}

.orwa-detail__back--solo .orwa-detail__back-link {
  color: var(--orwa-c-navy);
}

@media (prefers-reduced-motion: reduce) {
  .orwa-news-index::before,
  .orwa-news-index::after {
    animation: none;
  }
}

/* =========================================================
   768px〜
   ========================================================= */

@media (min-width: 768px) {
  .orwa-news-pager__list {
    gap: 0.5rem;
  }

  .orwa-news-pager .page-numbers {
    padding-inline: 0.75rem;
  }

  .orwa-news-pager .page-numbers.dots {
    padding-inline: 1rem;
  }

  .orwa-news-pager__label {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip-path: none;
  }

  .orwa-news-index::before {
    top: -0.575rem;
    width: 19.39375rem;
    aspect-ratio: 310.3 / 440.6;
    background-size: 19.6rem auto;
  }

  .orwa-news-index::after {
    top: 4.34375rem;
    width: 17.6875rem;
    aspect-ratio: 283 / 395.6;
    background-position: left top, left 0.675rem top 7.425rem;
    background-size: 18.05rem auto, 17.375rem auto;
  }

  .orwa-news-index__filter,
  .orwa-news-index__box {
    max-width: 73.125rem;
    margin-inline: auto;
  }

  .orwa-news-index__box {
    padding: 3.125rem;
    border-radius: 0.625rem;
  }

  .orwa-news-row {
    flex-direction: row;
    align-items: center;
    gap: 2.5rem;
    padding-inline: 1.875rem;
  }

  .orwa-news-row__meta {
    flex-shrink: 0;
    gap: 2.5rem;
    min-width: 16.125rem; /* 最も長いカテゴリー名でもタイトルの列がそろう幅 */
  }

  .orwa-news-row__date {
    font-size: 0.875rem;
  }

  .orwa-news-row__cat {
    min-width: 5.625rem;
    padding-inline: 1.25rem;
    font-size: 0.75rem;
  }

  .orwa-news-row__title {
    min-width: 0;
    padding-left: 1.375rem;
    -webkit-line-clamp: 1;
  }

  .orwa-news-row__title::before {
    width: 0.4375rem;
  }

  .orwa-detail {
    padding: 5rem 6.25rem;
  }

  .orwa-detail__date {
    font-size: 0.875rem;
  }

  .orwa-detail__title {
    font-size: 1.875rem;
    line-height: 1.4;
  }

  .orwa-detail__content,
  .orwa-detail__nav,
  .orwa-detail__back.orwa-detail__back--solo {
    margin-top: 3.75rem;
  }

  .orwa-detail__content h2,
  .orwa-detail__content h3 {
    margin-top: 3.75rem;
  }

  .orwa-detail__content h3 {
    background-size: 3.75rem 3px, 100% 3px;
    font-size: 1.125rem;
  }

  .orwa-detail__content h4 {
    font-size: 1rem;
    line-height: 1.75;
  }

  .orwa-detail__content th {
    width: 15.625rem;
  }

  .orwa-detail__content td {
    padding-inline: 1.875rem;
  }
}

/* =========================================================
   1200px〜（PC）
   ========================================================= */

@media (min-width: 1200px) {
  .orwa-news-archive__body,
  .orwa-news-single,
  .orwa-products-single {
    padding-top: 10rem;
  }

  .orwa-news-index__title {
    padding-top: 3.89375rem;
    font-size: 2rem;
  }

  .orwa-news-index__title::before {
    width: 11.91875rem;
  }

  .orwa-news-year__label {
    font-size: 1.25rem;
  }

  .orwa-news-year__field {
    width: 11.875rem;
  }

  .orwa-news-year__field::after {
    right: 1.65625rem;
    width: 0.4375rem;
  }

  .orwa-news-year__select {
    padding: 0.75rem 3.25rem 0.75rem 1.5rem;
    font-size: 0.875rem;
  }

  .orwa-news-index__box {
    padding-inline: 6.25rem;
  }
}

/* TASK_16：本文内の長い文字列・投稿時の固定幅を内容領域に収める。 */
.orwa-detail__content { overflow-wrap: anywhere; }
.orwa-detail__content pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.orwa-detail__content iframe { max-width: 100%; }
.orwa-detail__content iframe[src*="youtube.com"],
.orwa-detail__content iframe[src*="youtu.be"] { height: auto; aspect-ratio: 16 / 9; }
@media (max-width: 767px) {
  .orwa-detail__content table { max-width: 100%; table-layout: fixed; }
  .orwa-detail__content :is(th, td) { overflow-wrap: anywhere; }
}

/* 複数列の表に各thの120px指定を積み上げない。 */
@media (max-width: 767px) {
  .orwa-detail__content th { width: auto; }
  /* 450の空白による字下げも、本文を変えずに折り返す。 */
  .postid-100450 .orwa-detail__content p { white-space: break-spaces; }
}

/* =========================================================
   お知らせ記事の表（2026-11 追加CSSから移した）
   料金表の 3px の線は使わず、1px の枠線＋見出しセルは薄いグレー。
   お知らせの記事ページだけ（協会商品の本文には効かせない）。
   ========================================================= */

.single-news .orwa-detail__content table {
  width: 100%;
  margin-block: 1.5em;
  border: 1px solid var(--orwa-c-news-table);
  border-collapse: collapse;
}

.single-news .orwa-detail__content .wp-block-table {
  margin-block: 1.5em;
}

.single-news .orwa-detail__content .wp-block-table table {
  margin-block: 0;
}

.single-news .orwa-detail__content table :is(th, td) {
  padding: 0.375rem 0.625rem;
  border: 1px solid var(--orwa-c-news-table);
  color: var(--orwa-c-news-table);
  font-size: 0.9375rem;
  line-height: 1.7;
  text-align: left;
  vertical-align: middle;
}

.single-news .orwa-detail__content table th {
  background: var(--orwa-c-news-table-head);
  font-weight: 700;
}

/* 旧サイトから移した表（692〜694）。figure に orwa-legacy-table と配色のクラスを付けている */
.single-news .orwa-legacy-table {
  overflow-x: auto;
}

.single-news .orwa-legacy-table table th {
  width: 5.625rem;
  white-space: nowrap;
}

.single-news .orwa-legacy-table.is-beige table th {
  background: var(--orwa-c-news-table-beige);
}

.single-news .orwa-legacy-table.is-blue table :is(th, td) {
  padding: 0.625rem;
  border-color: var(--orwa-c-news-table-line);
}

.single-news .orwa-legacy-table.is-blue table th {
  width: 30%;
  background: var(--orwa-c-news-table-blue);
  color: var(--orwa-c-news-table-navy);
  white-space: normal;
}

.single-news .orwa-legacy-table.is-blue.is-th-wide table th {
  width: 55%;
}
