@charset "utf-8";

/* =========================================================
   NEWS (list/detail) 専用CSS
   ・既存 all.css / style.css / about.css は触らない
   ・news.css を最後に読み込んで上書きする
========================================================= */

/* =========================================================
   共通
========================================================= */
#news-contents.news-contents{
  padding: 70px 20px;
}

#news-contents .container{
  max-width: 980px;
  margin: 0 auto;
}

#news-contents .section-title{
  margin: 0 0 28px;
  letter-spacing: .04em;
}

/* =========================================================
   一覧（index.php）
========================================================= */
#news-contents .news-entry{
  background: #fff;
  border-radius: 16px;
  padding: 16px 18px;
  margin: 0 0 14px;
  box-shadow: 0 8px 20px rgba(0,0,0,.06);
  border: 1px solid rgba(0,0,0,.05);
}

#news-contents .news-entry:last-child{
  margin-bottom: 0;
}

#news-contents .news-entry a{
  display: flex;
  align-items: baseline;
  gap: 14px;
  color: inherit;
  text-decoration: none;
}

#news-contents .news-entry a:hover{
  opacity: 1;
}

#news-contents .news-entry a:focus-visible{
  outline: 3px solid rgba(233,30,99,.35);
  outline-offset: 3px;
  border-radius: 12px;
}

#news-contents .news-entry-date{
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  line-height: 1;
  color: #555;
  background: rgba(233,30,99,.08);
  border: 1px solid rgba(233,30,99,.12);
  padding: 7px 10px;
  border-radius: 999px;
}

#news-contents .news-entry-title{
  flex: 1 1 auto;
  font-size: 18px;
  line-height: 1.6;
  color: #222;
}

#news-contents .news-entry a::after{
  content: "›";
  flex: 0 0 auto;
  font-size: 22px;
  line-height: 1;
  color: rgba(0,0,0,.35);
  margin-left: auto;
}

/* =========================================================
   詳細（detail.php）
   画像：PCは右 / スマホは見出し下 → 本文 → ボタン
   ※HTML構造：news-detail-content の中に nav が入っていても崩れない
========================================================= */
#news-contents .news-detail-wrap{
  max-width: 980px;
  margin: 0 auto;
}

#news-contents .news-detail-card{
  background: #fff;
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 10px 30px rgba(0,0,0,.07);
  border: 1px solid rgba(0,0,0,.05);
}

/* はみ出し防止（カード内の計算を安定させる） */
#news-contents .news-detail-card,
#news-contents .news-detail-card *{
  box-sizing: border-box;
}

#news-contents .news-detail-date{
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  line-height: 1;
  color: #555;
  background: rgba(233,30,99,.08);
  border: 1px solid rgba(233,30,99,.12);
  padding: 7px 10px;
  border-radius: 999px;
  margin: 0 0 10px;
}

#news-contents .news-detail-title{
  margin: 0 0 14px;
  font-size: 26px;
  line-height: 1.4;
  letter-spacing: .02em;
  color: #222;
}

/* 画像＋本文＋nav の並びを制御（navは必ず下へ） */
#news-contents .news-detail-content{
  display: flex;
  flex-wrap: wrap;      /* navを下段へ落とす */
  gap: 22px;
  align-items: flex-start;
}

/* 本文（左） */
#news-contents .news-detail-body{
  order: 1;
  flex: 1 1 520px;
  min-width: 0;
  font-size: 16px;
  line-height: 2.0;
  color: #222;
}

#news-contents .news-detail-body p{
  margin: 0;
}

/* 画像（右）※画像がない場合はこのブロック自体が出ない前提 */
#news-contents .news-detail-image{
  order: 2;
  flex: 0 0 360px;
  max-width: 360px;
  margin: 0;
  margin-left: auto;
}

#news-contents .news-detail-image img{
  width: 100%;
  height: auto;
  display: block;
  border-radius: 16px;
}

/* ナビ（必ず下段・全幅） */
#news-contents .news-detail-nav{
  order: 3;
  flex: 0 0 100%;
  width: 100%;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}

/* ボタン */
#news-contents .news-detail-back{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 16px;
  border-radius: 999px;
  background: #f2f4f8;
  color: #222;
  text-decoration: none;
  font-size: 14px;
  border: 1px solid rgba(0,0,0,.06);

  /* はみ出し防止 */
  max-width: 100%;
}

/* =========================================================
   SP調整
========================================================= */
@media (max-width: 767px){
  #news-contents.news-contents{
    padding: 52px 14px;
  }

  /* 一覧 */
  #news-contents .news-entry{
    padding: 14px;
    border-radius: 14px;
  }

  #news-contents .news-entry a{
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  #news-contents .news-entry-title{
    font-size: 16px;
  }

  #news-contents .news-entry a::after{
    display: none;
  }

  /* 詳細 */
  #news-contents .news-detail-card{
    padding: 16px;
    border-radius: 16px;
  }

  #news-contents .news-detail-title{
    font-size: 20px;
    margin-bottom: 12px;
  }

  #news-contents .news-detail-content{
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 14px;
  }

  #news-contents .news-detail-image{
    order: 1;
    width: 100%;
    max-width: none;
    margin-left: 0;
  }

  #news-contents .news-detail-body{
    order: 2;
    flex: 1 1 auto;
    font-size: 15px;
    line-height: 2.0;
  }

  #news-contents .news-detail-nav{
    order: 3;
    margin-top: 10px;
    flex-direction: column;
    gap: 10px;
  }

  #news-contents .news-detail-back{
    width: 100%;
  }
}