@charset "utf-8";

/* ======================================================
新着情報
========================================================= */


/* 空ラベル時は背景も表示もしない */
.news-label span:empty {
  display: none;
}


.news-block {
  display: flex; /* PCではFlexboxで横並び */
  width:97%;
  margin: 0 0.5em;
  padding: 0;
  list-style: none;
  border-bottom: 1px dotted #ccc; /* 記事の下に区切り線 */
  gap:1rem;
}

.news-block > li {
  padding: 10px 0;
  line-height: 1.3; /* 全体の行高を統一してズレを防止 */
}

/* 日付 */
.news-date {
  width: 100px;
  font-weight: bold;
  color: maroon;
  white-space: nowrap;
  text-align: right;
}

/* ラベル外側 */
.news-label {
  width: 125px;
  text-align: center;
}

/* ラベル中身 */
.news-label span {
  display: inline-block;
  background-color: #f2f2f2;
  color: #555;
  border-radius: 4px;
  padding: 0.2em 0.9em;
  font-size: 0.8rem;
  width: 110px;
  line-height: 1.4; /* ラベル内だけ少し詰める */
  vertical-align: middle;
  white-space: nowrap;
}

/* 記事 */
.news-title {
  flex: 1;
  padding-left: 1em;
}


/* 詳細こちらボタン */
.news-title a.btn-detail {
  display: inline-flex; /* アイコンと文字を横並びに固定 */
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  flex-shrink: 0;
  padding: 2px 5px;
  margin: 0 0 0 5px;
  border-radius: 3px;
  font-size: 0.9em;
  background-color: #e3f2fd;
  line-height: 1;
}

.btn-detail i {
  font-size: 0.9em;
  margin-left: 5px;
  color: #1565c0;
}

/* ホバー時はmaroonを反転 */
.news-title a.btn-detail:hover {
  background-color: #bbdefb;
  color: #0d47a1 !important;
  text-decoration: none;
}
/* ########### 550px以下 ########### */
@media (max-width: 550px) {
  .news-block {
    display: grid; /* スマホではGridに切り替え */
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "date label"
      "title title";
    gap: 0 10px; 
    padding:10px 5px;
  }

  .news-block > li {
    padding: 0;
    line-height: 1.2;
  }
  .news-date {
    grid-area: date;
    width: auto;
    padding-top:5px !important;
    padding-bottom: 0;

  }

  .news-label {
    grid-area: label;
    width: auto;
    text-align: left;
    padding-top:3px !important;
    padding-bottom: 0;
  }

  .news-label span {
    width: auto; /* スマホではラベル幅を文字に合わせる */
  }

  .news-title {
    display: block;
    grid-area: title;
    padding-left: 0;
    padding-top:5px !important;
    font-size: 0.95rem;
    line-height: 1.4 !important;
  }
  .news-title a.btn-detail {
  margin: 0px;

}
}