
#news_top_page{
  width: 100%;
  padding-top: 40px;
}

/* #bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
} */

.news-head {
  /* margin: 40px 0 40px 0; */
  padding:0;
  width:100%;
  position: relative;
}


/* ===== 帯 ===== */
.news-visual {
  width: 100%;
  max-width: 1280px; /* ← n-contと同じにする */
  /* height: 450px; */


  display: flex;
  justify-content: center; /* 横中央 */
  align-items: center;     /* 縦中央 */
  gap: 20px;               /* 画像間 */

}

/* 個人情報など注意書き */
.image-note {
  text-align: left;
  width: fit-content;
  margin: 0 auto;
  padding: 40px 0;
  color: #999;
  font-size: 16px;
  line-height: 1.8;
}

@media only screen and (max-width: 1024px){
.news-visual{
  /* height: 420px; */
}
}

.news-visual > img {
  max-width: 350px;
  margin: 40px;
}

/* ===== n-contと揃えるための箱 ===== */

.news-visual .inner {
  width: 100%;
  height: 100%;
  max-width: 1280px; /* ← n-contと同じにする */
  margin: 0 auto;
  position: relative;
  width: 100%;
  height: 150px;

  background: linear-gradient(
    87deg,
    #fff 0%,
    #FEE2E4 60%,
    #FFF3E5 80%,
    #ffefdd 100%
  );
}


/* ===== タイトル（中央） ===== */
.news-title {
  position: absolute;
  top: 48%;
  left: 50%;
  text-align: center;
  transform: translate(-50%, -50%);
  font-size: 36px;
  /* font-weight: bold; */
  letter-spacing: 3px;
  color: #fff;
  text-shadow: 2px 2px 3px #999999;
}

/* ===== キャッチコピー（右寄せ） ===== */
.img1{
  position: absolute;
  right: 5%;
  width: 65%;
  margin: 40px 0 0 0;
}

.img2{
  width: 65%;
  position: absolute;
  right: 5%;
  margin: 40px 0 0 0;
  opacity: 0;
}

@media only screen and (max-width: 1024px){
.img1{
  opacity: 0;
}

.img2{
  opacity: 1;
}
}

@media only screen and (max-width: 680px){


.img2{
  width: 80%;
}
}

/* ===== 流体シェイプ ===== */
.bg-shape {
  position: absolute;
  right: 2%;
  bottom: -25%;
  width: 500px;
  height: 400px;
  opacity: 0.6;
  filter: blur(40px);
  z-index: -10;
}

@media only screen and (max-width: 680px){
.bg-shape {
  right: -10%;
  bottom: -20%;
  width: 400px;
  height: 300px;
}
}

.bg-shape svg {
  width: 100%;
  height: 75%;
}

.news-body {
  position: relative;
  z-index: 0;
}


/* canvasを背景にする */
/* #news-bg-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
} */


/* ===== 記事一覧エリアの背景 ===== */
.news-body::before {
  content: "";
  position: absolute;
  z-index: -2;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 100%;

  background:
    linear-gradient(
      135deg,
      #ffffff 0%,
      #fff9fb 58%,
      #ffeff2 100%
    );

  pointer-events: none;
}

/* ===== タグ帯（簡素化） ===== */
#tag-filter {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;

  background: rgba(255, 255, 255, 0.72);
  padding: 10px 12px;
  margin-bottom: 22px;

  border-radius: 10px;
  border: 1px solid rgba(255, 185, 201, 0.42);
  box-shadow:
    0 8px 24px rgba(170, 120, 130, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* hover追従背景は残すが、主張を弱くする */
#tag-filter::before {
  content: "";
  position: absolute;
  z-index: 1;

  top: var(--y, 0);
  left: var(--x, 0);
  width: var(--w, 0);
  height: var(--h, 0);

  border-radius: 16px;
  background: rgba(248, 207, 207, 0.55);

  opacity: 0;
  pointer-events: none;

  transition:
    top 0.25s cubic-bezier(0.22, 1, 0.36, 1),
    left 0.25s cubic-bezier(0.22, 1, 0.36, 1),
    width 0.25s cubic-bezier(0.22, 1, 0.36, 1),
    height 0.25s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.15s;
}

#tag-filter.active::before {
  opacity: 1;
}

.tag-filter button {
  position: relative;
  z-index: 2;

  margin: 2px;
  padding: 7px 13px;

  border: none;
  border-radius: 16px;

  font-size: 14px;
  line-height: 1.4;
  cursor: pointer;

  background: transparent;
  color: #333;

  transition: color 0.2s;
}

.tag-filter button:hover {
  color: #333;
}


/* ===== 一覧 ===== */
.news-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}

@media (max-width: 1024px) {
  .news-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 800px) {
  .news-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .news-list {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}


/* ===== カード：ニューモーフィズム試作 ===== */
.news-card {
  position: relative;
  border-radius: 5px;
  overflow: hidden;
  isolation: isolate;
  cursor: pointer;

  border: none;
  padding: 0;

  /* 背景とカードを近い色にして、影で立体感を出す */
  background: #ffffff;

  box-shadow:
    10px 10px 24px rgba(211, 196, 201, 0.38),
    -10px -10px 24px rgba(255, 255, 255, 0.95);

  transition:
    transform 0.8s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}


/* サムネイルは1：1を維持 */
.news-card img {
  width: 100%;
  display: block;

  aspect-ratio: 1 / 1;
  object-fit: contain;

  border-radius: 5px 5px 0 0;
  background: #ffffff;

  transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: center;

  position: relative;
  z-index: 0;
}


/* ニューモーフィズムではガラス膜・枠線を使わない */
.news-card::before,
.news-card::after {
  display: none;
}


/* 中身は上に */
.news-card .content {
  position: relative;
  z-index: 10;
}

.news-card .text {
  position: relative;
  min-height: 92px;
  height: 92px;
  box-sizing: border-box;
  padding: 12px 14px 8px;
  background: #ffffff;
  font-family:"Hiragino Kaku Gothic ProN",
      "Hiragino Sans",
      "Yu Gothic",
      "Meiryo",
      sans-serif;
}


/* カテゴリーカラーの光は使わず、ホバー時にタイトルの色だけ変える */
.news-card .text::before {
  display: none;
}


/* リンクの下線を消し、通常時は黒文字で表示 */
.news-card,
.news-card a,
.news-card a:visited {
  text-decoration: none !important;
}


/* 日付・タイトルは一覧用にサイズを固定し、説明文は表示しない */
.news-card .date {
  display: block;
  margin: 0 0 4px;
  font-size: 12px;
  line-height: 1.4;
  color: #222222 !important;
  text-decoration: none !important;
}

.news-card h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  color: #222222 !important;
  text-decoration: none !important;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  height: 42px;
}

.news-card .desc {
  display: none !important;
}


/* カテゴリーごとのアクセント色 */
.news-card.doctor {
  --news-accent: #43b97a;
}

.news-card.kango {
  --news-accent: #e56b98;
}

.news-card.co-medical {
  --news-accent: #4c9fe8;
}

.news-card:not(.doctor):not(.kango):not(.co-medical) {
  --news-accent: #d79b2e;
}


/* hover：ふわっと浮いて、画像がほんの少し近づく */
.news-card:hover {
  transform: translateY(-3px);

  box-shadow:
    13px 13px 28px rgba(211, 196, 201, 0.32),
    -13px -13px 28px rgba(255, 255, 255, 0.98);
}

.news-card:hover img {
  transform: scale(1.02);
}

.news-card:hover .date,
.news-card:hover h3 {
  color: var(--news-accent) !important;
  transition: color 0.5s ease;
}


@media (max-width: 680px) {
  .news-card {
    box-shadow:
      8px 8px 18px rgba(211, 196, 201, 0.32),
      -8px -8px 18px rgba(255, 255, 255, 0.92);
  }

  .news-card .text {
    height: 92px;
    min-height: 92px;
    padding: 12px 14px 8px;
  }

  .news-card .date {
    font-size: 12px;
  }

  .news-card h3 {
    font-size: 14px;
    line-height: 1.5;
    height: 42px;
  }
}