/* ============================================================
   p-news.css — お知らせ（一覧 / 詳細）

   hakusui_page_key() が news を返すため、
   archive-news.php / single-news.php の両方でこの1枚が読まれる。
   一覧だけ・詳細だけの指定は .hero の -newsArchive / -newsSingle と
   .news__ / .newsDetail__ のブロック名で分けている。

   ヒーローの三角形とクリップアニメーションは p-privacy-policy.css と同じ作り。
   ============================================================ */

/* ---------- hero 共通 ---------- */
  .hero__triangle1 {
    position: absolute;
    right: 0px;
    top: 0px;
    width: 294px;
    animation: clipB 0.5s forwards;
    clip-path: polygon(0% 0%, 56% 100%, 100% 21%, 100% 0, 71% 0, 56% 27%, 41% 0);
    animation-delay: 0.4s;
    animation-timing-function: cubic-bezier(0.61, 1, 0.88, 1);
    max-inline-size: initial;
  }
  .hero__triangle2 {
    position: absolute;
    right: 0px;
    bottom: 0px;
    width: 232px;
    animation: clipC 0.5s forwards;
    clip-path: polygon(18% 0%, 0% 13%, 0 13%, 18% 0%, 18% 0%, 18% 0%);
    animation-delay: 0.4s;
    animation-timing-function: cubic-bezier(0.61, 1, 0.88, 1);
  }
  @media (width >= 768px) {
    .hero__inner {
      width: calc(952 / 1600 * 100%);
      height: 100%;
    }
    .hero__triangle1 {
      position: absolute;
      right: 157px;
      top: 0;
      width: 609px;
      animation: clipA 0.5s forwards;
      clip-path: polygon(0% 0%, 0 0, 39% 0, 39% 0, 39% 0, 39% 0);
    }
    .hero__triangle2 {
      position: absolute;
      bottom: -40px;
      width: 500px;
    }
    .hero.-newsSingle .hero__inner{
      width: calc(1100 / 1600 * 100%);
    }
  }
  .hero__triangle1 img,
  .hero__triangle2 img {
    width: 100%;
  }

  /* 一覧：見出しを収めるぶん深く取る */
  .hero.-newsArchive .hero__topBg {
    height: 550px;
  }
  @media (width >= 768px) {
    .hero.-newsArchive .hero__topBg {
      height: 604px;
    }
  }

  /* 詳細：パンくずだけなので浅い。本文カードを早く見せる */
  .hero.-newsSingle .hero__topBg {
    height: 150px;
  }
  .hero.-newsSingle .hero__title {
    margin-top: 80px;
  }
  .hero.-newsSingle .breadcrumb__wrap {
    margin-bottom: 0;
  }
  /*
   * 詳細のパンくずは末尾が記事タイトルなので長くなる。
   * SP だと「ホー／ム」のように前2つまで折り返されるため、
   * 前半は折り返さず、記事タイトルだけを1行省略にする。
   */
  .hero.-newsSingle .breadcrumb__list {
    align-items: center;
  }
  .hero.-newsSingle .breadcrumb__list li:not(:last-child) {
    white-space: nowrap;
    flex-shrink: 0;
  }
  .hero.-newsSingle .breadcrumb__list li:last-child {
    min-width: 0;
  }
  .hero.-newsSingle .breadcrumb__current {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  @media (width >= 768px) {
    .hero.-newsSingle .hero__topBg {
      height: 228px;
    }
    .hero.-newsSingle .hero__title {
      margin-top: 177px;
    }
  }

  /*
   * 見出しは1語なので -lgTop だけを使う。
   * common.css の .headingSecondary__title .-lgTop は青（--color-blue2）だが、
   * デザイン上ここは白なので上書きする（他ページの .company / .recruit 配下の
   * 上書きと同じやり方）。
   */
  .news__title .headingSecondary__title .-lgTop {
    color: var(--color-white);
  }

/* ---------- 一覧 ---------- */
  .news__content {
    position: relative;
    padding-top: 88px;
    padding-bottom: 140px;
    background-color: var(--color-white);
    color: var(--color-black);
  }

  @media (width >= 768px) {
    .news__content {
      padding-top: 120px;
      padding-bottom: 368px;
    }
  }

  .news__triangle1 {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
  }
  .news__triangle2 {
    width: calc(696 / 1600 * 100%);
    position: absolute;
    right: 0;
    bottom: 0;
  }
  @media (width >= 768px) {
    .news__triangle1 {
      width: calc(879 / 1600 * 100%);
    }
  }
  .news__wrapper {
    position: relative;
    z-index: 1;
    width: calc(326 / 375 * 100%);
    max-width: 1200px;
    margin-inline: auto;
  }
  @media (width >= 768px) {
    .news__wrapper {
      width: calc(952 / 1600 * 100%);
    }
  }

  .news__list {
    border-bottom: 1px solid var(--color-gray);
  }
  .news__item + .news__item {
    border-top: 1px solid var(--color-gray);
  }
  .news__link {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    column-gap: 16px;
    row-gap: 8px;
    padding-block: 24px;
    color: inherit;
    text-decoration: none;
  }
  @media (width >= 768px) {
    .news__link {
      grid-template-columns: auto 1fr auto;
      column-gap: 30px;
      padding-block: 28px;
    }
  }
  .news__meta {
    display: flex;
    align-items: center;
  }
  @media (width < 768px) {
    .news__meta {
      grid-column: 1 / -1;
    }
  }
  .news__date {
    margin-right: 10px;
    font-weight: bold;
    font-size: 15px;
  }
  @media (width >= 768px) {
    .news__date {
      margin-right: 46px;
      font-size: 16px;
    }
  }
  .news__category {
    width: 93px;
    height: 29px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    background-color: #e9e9f0;
    font-size: 15px;
    flex-shrink: 0;
    font-weight: 500;
  }
    @media (width >= 768px) {
      .news__category {
        font-size: 16px;
      }
    }
  .news__itemTitle {
    color: var(--color-blue);
    text-decoration: underline;
    font-size: 15px;
    line-height: calc(26 / 15);
    font-weight: 500;
  }
  @media (width >= 768px) {
    .news__itemTitle {
      font-size: 16px;
      line-height: calc(28 / 16);
    }
  }
  .news__arrowWrap {
    position: relative;
    width: 16px;
    height: 17px;
    flex-shrink: 0;
    display: none;
  }
  @media (width >= 768px) {
    .news__arrowWrap {
      display: block;
    }
  }
  .news__arrow {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 100%;
    height: 100%;
    background-image: url(../img/arrow_blue.svg);
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    transition: all 0.4s;
  }
  .news__arrow.-second {
    transform: translateX(-30%);
    opacity: 0;
  }
  @media (any-hover: hover) {
    .news__link:hover .news__arrow.-first {
      transform: translateX(100%);
      opacity: 0;
    }
    .news__link:hover .news__arrow.-second {
      transform: translateX(0%);
      opacity: 1;
    }
    .news__link:hover .news__itemTitle {
      text-decoration: none;
    }
  }
  .news__empty {
    font-size: 15px;
    line-height: calc(28 / 15);
  }

  .news__pager {
    margin-top: 48px;
  }
  @media (width >= 768px) {
    .news__pager {
      margin-top: 72px;
    }
  }
  .news__pagerList {
    display: flex;
    align-items: center;
    justify-content: center;
    column-gap: 8px;
    flex-wrap: wrap;
    row-gap: 8px;
  }
  .news__pagerItem .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--color-gray);
    font-family: var(--font-poppins);
    font-size: 15px;
    font-weight: 700;
    color: var(--color-black);
    text-decoration: none;
    transition: background-color 0.4s, color 0.4s;
  }
  .news__pagerItem .page-numbers.current {
    background-color: var(--color-blue);
    border-color: var(--color-blue);
    color: var(--color-white);
  }
  @media (any-hover: hover) {
    .news__pagerItem a.page-numbers:hover {
      background-color: var(--color-blue);
      border-color: var(--color-blue);
      color: var(--color-white);
    }
  }
  .news__pagerArrow {
    display: block;
    width: 10px;
    height: 11px;
    background-image: url(../img/arrow_blue.svg);
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
  }
  .news__pagerArrow.-prev {
    transform: rotate(180deg);
  }

/* ---------- 詳細 ---------- */
  .newsDetail__content {
    position: relative;
    padding-bottom: 144px;
    background-color: var(--color-blue);
  }
  @media (width >= 768px) {
    .newsDetail__content {
      padding-bottom: 122px;
    }
  }
  .newsDetail__triangle1 {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    opacity: 0.2;
  }
  .newsDetail__triangle2 {
    width: calc(696 / 1600 * 100%);
    position: absolute;
    right: 0;
    bottom: 0;
    opacity: 0.2;
  }
  @media (width >= 768px) {
    .newsDetail__triangle1 {
      width: calc(879 / 1600 * 100%);
    }
  }
  .newsDetail__wrapper {
    position: relative;
    z-index: 1;
    width: calc(326 / 375 * 100%);
    max-width: 1200px;
    margin-inline: auto;
  }
  @media (width >= 768px) {
    .newsDetail__wrapper {
      width: calc(1100 / 1600 * 100%);
    }
  }

  .newsDetail__article {
    background-color: var(--color-white);
    color: var(--color-black);
    padding: 56px 24px 108px;
  }
  @media (width >= 768px) {
    .newsDetail__article {
      padding: 92px 74px 164px;
    }
  }
  .newsDetail__head {
    display: flex;
    align-items: center;
  }
  .newsDetail__date {
    margin-right: 15px;
    font-weight: bold;
    font-size: 15px;
  }
  @media (width >= 768px) {
    .newsDetail__date {
      font-size: 16px;
    }
  }
  .newsDetail__category {
    width: 93px;
    height: 29px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    background-color: #e9e9f0;
    font-size: 15px;
    flex-shrink: 0;
  }
  .newsDetail__title {
    font-size: 20px;
    font-weight: 500;
    line-height: calc(28 / 20);
    margin-top: 20px;
    padding-bottom: 24px;
    border-bottom: 1px solid #172683;
    color: #000;
  }
  @media (width >= 768px) {
    .newsDetail__title {
      font-size: 24px;
      line-height: calc(35 / 24);
      margin-top: 20px;
      padding-bottom: 24px;
    }
  }

  /* 本文：ブロックエディタの出力をここで受ける */
  .newsDetail__body {
    margin-top: 32px;
    font-size: 15px;
    font-weight: 500;
    line-height: calc(28 / 15);
  }
  @media (width >= 768px) {
    .newsDetail__body {
      margin-top: 40px;
      font-size: 16px;
      line-height: calc(30 / 16);
    }
  }
  .newsDetail__body h2,
  .newsDetail__body h3,
  .newsDetail__body h4 {
    font-weight: 700;
    line-height: 1.6;
  }
  .newsDetail__body h2 {
    font-size: 18px;
  }
  .newsDetail__body h3,
  .newsDetail__body h4 {
    font-size: 16px;
  }
  @media (width >= 768px) {
    .newsDetail__body h2 {
      font-size: 20px;
    }
    .newsDetail__body h3,
    .newsDetail__body h4 {
      font-size: 18px;
    }
  }
  .newsDetail__body > h2 + *,
  .newsDetail__body > h3 + *,
  .newsDetail__body > h4 + * {
    margin-top: 16px;
  }
  .newsDetail__body > * + h2,
  .newsDetail__body > * + h3,
  .newsDetail__body > * + h4 {
    margin-top: 40px;
  }
  .newsDetail__body a {
    color: var(--color-blue);
    text-decoration: underline;
  }
  @media (any-hover: hover) {
    .newsDetail__body a:hover {
      text-decoration: none;
    }
  }
  .newsDetail__body img {
    max-width: 100%;
    height: auto;
  }
  .newsDetail__body figure {
    margin: 0;
  }
  .newsDetail__body figcaption {
    margin-top: 8px;
    font-size: 13px;
    color: var(--color-gray2);
  }
  .newsDetail__body ul,
  .newsDetail__body ol {
    padding-left: 1.25em;
  }
  .newsDetail__body ul {
    list-style: disc;
  }
  .newsDetail__body ol {
    list-style: decimal;
  }
  .newsDetail__body li + li {
    margin-top: 8px;
  }
  .newsDetail__body blockquote {
    padding-left: 16px;
    border-left: 2px solid var(--color-gray);
    color: var(--color-gray2);
  }
  .newsDetail__body table {
    width: 100%;
    border-collapse: collapse;
  }
  .newsDetail__body th,
  .newsDetail__body td {
    border: 1px solid var(--color-gray);
    padding: 8px 12px;
    text-align: left;
  }

/* 記事送り */
  .newsDetail__nav {
    display: grid;
    grid-template:
      "prev next" auto
      "back back" auto;
    align-items: center;
    column-gap: 12px;
    margin-top: 40px;
    color: var(--color-white);
  }
  .newsDetail__navSide.-prev{
    grid-area: prev;
  }
  .newsDetail__navSide.-next {
    grid-area: next;
  }
  .newsDetail__navBack a {
    margin-inline:auto;
    font-size: 18px;
    width: 300px;
  }

  .newsDetail__navBack{
    grid-area: back;
    text-align: center;
    margin-top: 40px;
  }
  @media (width >= 768px) {
    .newsDetail__nav {
      column-gap: 24px;
      margin-top: 64px;
      grid-template:initial;
      grid-template-columns: 1fr auto 1fr !important;
      grid-template:
      "prev back next" auto;
    }
    .newsDetail__navBack{
      margin-top: 0px;
    }
  }
  .newsDetail__navSide.-next {
    display: flex;
    justify-content: flex-end;
  }
  .newsDetail__navLink {
    display: inline-flex;
    align-items: center;
    column-gap: 10px;
    color: inherit;
    text-decoration: none;
  }
  @media (width >= 768px) {
    .newsDetail__navLink {
      column-gap: 18px;
    }
  }
  .newsDetail__navLabel {
    font-family: var(--font-poppins);
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
  }
  @media (width >= 768px) {
    .newsDetail__navLabel {
      font-size: 16px;
    }
  }
  .newsDetail__navArrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--color-white);
    fill: var(--color-blue);
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
  }
  .newsDetail__navArrow svg{
        fill: var(--color-blue);
  }
  .newsDetail__navArrow.-prev svg {
    transform: rotate(180deg);
  }
  /*
   * 矢印は common.css の .buttonArrow（buttonPrimary）と同じ入れ替え演出。
   * -first が抜けて -second が入ってくる。向きは -prev / -next で反転させる。
   * svg 側の rotate(180deg) と干渉しないよう、移動は外側の -first / -second に持たせる。
   * 白ベタの箱なので、はみ出す分は overflow で切る。
   */
  .newsDetail__navArrow .-first,
  .newsDetail__navArrow .-second {
    height: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s;
  }
  .newsDetail__navArrow .-second {
    position: absolute;
    inset: 0;
    margin: auto;
    opacity: 0;
  }
  .newsDetail__navArrow.-next .-second {
    transform: translateX(-30%);
  }
  .newsDetail__navArrow.-prev .-second {
    transform: translateX(30%);
  }
  @media (any-hover: hover) {
    .newsDetail__navLink:hover .newsDetail__navArrow.-next .-first {
      transform: translateX(100%);
      opacity: 0;
    }
    .newsDetail__navLink:hover .newsDetail__navArrow.-prev .-first {
      transform: translateX(-100%);
      opacity: 0;
    }
    .newsDetail__navLink:hover .newsDetail__navArrow .-second {
      transform: translateX(0%);
      opacity: 1;
    }
  }
  .newsDetail__navBack a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 76px;
    background-color: var(--color-white);
    color: var(--color-black);
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 0.4s, color 0.4s;
  }
   .newsDetail__navBack a {
      border: 1px solid transparent;
    }
  @media (width >= 768px) {
    .newsDetail__navBack a {
      width: 301px;
      height: 76px;
    }
  }
  @media (any-hover: hover) {
    .newsDetail__navBack a:hover {
      background-color: var(--color-blue);
      color: var(--color-white);
      border: 1px solid var(--color-white);
    }
  }

/* ---------- hero のクリップアニメーション ---------- */
  @keyframes clipA {
    0% {
      clip-path: polygon(0% 0%, 0 0, 39% 0, 39% 0, 39% 0, 39% 0);
    }
    50% {
      clip-path: polygon(0% 0%, 50% 99%, 72% 59%, 50% 21%, 50% 22%, 39% 0);
    }
    100% {
      clip-path: polygon(0% 0%, 50% 99%, 100% 0, 61% 0, 50% 22%, 39% 0);
    }
  }
  @keyframes clipB {
    0% {
      clip-path: polygon(0% 0%, 0 0, 41% 0, 41% 0, 41% 0, 41% 0, 41% 0);
    }
    50% {
      clip-path: polygon(0% 0%, 56% 100%, 78% 60%, 65% 41%, 56% 27%, 56% 27%, 41% 0);
    }
    100% {
      clip-path: polygon(0% 0%, 56% 100%, 100% 21%, 100% 0, 71% 0, 56% 27%, 41% 0);
    }
  }
  @keyframes clipC {
    0% {
      clip-path: polygon(0 100%, 0 100%, 42% 100%, 42% 100%);
    }
    100% {
      clip-path: polygon(0 100%, 100% 0%, 100% 42%, 42% 100%);
    }
  }
.newsDetail__body p + h2{
  margin-top: 24px;
}
.newsDetail__body p:has(a){
  margin-top: 45px;
}
@media (width >= 768px) {
  .newsDetail__body p:has(a){
    margin-top: 24px;
  }
}
.newsDetail__body p + p:has(strong){
  margin-top: 24px;
}
.newsDetail__body figure{
  margin-top: 45px;
}
.newsDetail__body p {
  line-height: 2;
}
@media (width >= 768px) {
  .newsDetail__body figure{
    margin-top: 60px;
  }
  .newsDetail__body p {
    line-height: 1.94;
  }
}
