@charset "utf-8";
@import url("root.css");

/***************************************
-------------- NEWS --------------
***************************************/
.news_wrap {
  width: 94%;
  margin: auto;
}
.news_list {
  width: 100%;
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  dt a,
  dd a {
    width: fit-content;
    display: flex;
    flex-shrink: 0;
    font-size: 1.8rem;
  }
  dd a:hover {
    text-decoration: underline;
  }
}
.news_list:not(:last-of-type) {
  padding-bottom: 2rem;
  border-bottom: 2px dotted #999;
  margin-bottom: 2rem;
}

@media (max-width: 599px) {
  .news_list {
    flex-wrap: wrap;
    dt {
      width: 100%;
      margin-bottom: 1rem;
    }
    dd {
      width: 100%;
    }
  }
}

#news_detail {
  .detail_date {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin: 0 auto 2rem;
    span {
      margin: 0;
    }
  }
  h2 {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: bold;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--base-color01);
    margin-bottom: 2rem;
  }
  .detail_text {
    margin-bottom: clamp(15px, 3vw, 30px);
  }
}

.detail_img_wrap {
  display: flex;
  width: 100%;
  margin-bottom: clamp(10px, 2vw, 20px);
  gap: clamp(10px, 2vw, 20px);
  align-items: stretch;
  .detail_img_box {
    width: 49%;
    height: auto;
    aspect-ratio: 1/1;
    border-radius: 8px;
    background: #fafafa;
    a {
      display: block;
      width: 100%;
      height: 100%;
      img {
        display: block;
        width: 100%;
        height: 100%;
        aspect-ratio: 1/1;
        object-fit: cover;
      }
    }
  }
}

/* PDF用スタイル */
.detail_img_box.is-pdf {
  aspect-ratio: 1/1;
}
.detail_img_box.is-pdf a {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  background: #fafafa;
  overflow: hidden;
}
.detail_img_box.is-pdf img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 1/1;
}
.detail_img_box.is-pdf .pdf_icon {
  width: clamp(48px, 16vw, 96px);
  height: clamp(48px, 16vw, 96px);
  background: no-repeat center/contain;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='256' height='256' viewBox='0 0 256 256'%3E%3Crect rx='24' width='256' height='256' fill='%23e53935'/%3E%3Ctext x='50%25' y='58%25' text-anchor='middle' font-family='Arial,Helvetica,sans-serif' font-size='110' font-weight='700' fill='white'%3EPDF%3C/text%3E%3C/svg%3E");
}
.detail_img_box.is-pdf a:hover {
  filter: brightness(0.97);
}

/* PDFカード表示（PDF自体を表示、画像のように見せる） */
.detail_pdf_box {
  width: 49%;
}
.detail_pdf_box:hover {
  filter: brightness(0.97);
}
.detail_pdf_box iframe {
  display: block;
  width: 100%;
  height: auto;
  border: 0;
}
/* pdf.js のキャンバス描画: 横幅いっぱい、縦は比率維持で自動 */
/* .detail_pdf_box canvas {
  display: block;
  width: 100% !important;
  height: auto !important;
  margin: 0 auto;
} */

/* PDFが1件のみのときは横幅100%でより大きく表示（PC） */
.detail_img_wrap.pdf-count-1 .detail_pdf_box {
  width: 100%;
}

/* PDFが2件のときもPCでは1列表示にして高さ（実サイズ）を確保 */
.detail_img_wrap.pdf-count-2 .detail_pdf_box {
  width: 100%;
}

/* アクセシビリティ: 画面外にテキストを隠す */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 599px) {
  .detail_img_wrap {
    gap: 12px;
  }
  .detail_img_wrap .detail_img_box {
    width: 100%;
  }
  .detail_img_box.is-pdf {
    width: 100%;
  }
  .detail_pdf_box {
    width: 100%;
  }
}
