/*
Theme Name: breath Theme
Author: t-nishikawa
Description: シンプルな自作テーマ
Version: 1.0
*/
@charset "UTF-8";

body {
  font-family: sans-serif;
  color: #333;
  padding: 20px;
  /* ↓↓リセットcss↓↓ */
  p,h1,h2,h3,h4,h5,h6 {
    margin-top: 0;
  }
  img {
    vertical-align: bottom;
  }
  ul {
    margin: 0;
    padding: 0;
  }
  /* ↑↑リセットcss↑↑ */
  a {
    color: #333;
    text-decoration: none;
  }
  a:visited {
    color: ;
  }
  a:hover {
    text-decoration: underline;
}

header div {
  position: relative;
  height: 320px;
  background-image: url("img/DSC_4159-2.jpg");
  background-size: cover;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

header div::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.3); /* 白の30%透明 */
}

header h1 {
  position: relative;
  z-index: 1;   
  margin: 20px auto 50px;
  padding: 10px;
  width: 180px;
  color: #333;
  font-weight: normal;
  text-align: center;
}

header h1 a:hover {
  text-decoration: none;
}

header nav {
  width: 80%;
  margin: 0 auto;
  padding: 5px 0;
  background-color:;
}

header ul {
  display: flex;
}

header li {
  list-style: none;
  flex: auto;
  margin: 0% 8%;
  text-align: center;
}

main {
  width: 80%;
  margin: 80px auto 0;
}

main h2 {
  font-weight: normal;
  width: 40%;
  text-align: center;
  margin: 40px auto 40px;
}

main article h3{
  font-weight: normal;
}

.post-list {
  display: flex;
  flex-wrap: wrap;
  margin: 0 auto;
  width: 60%;
}

.post-list article {
  flex: auto;
  margin: 0 auto 80px;
}

.date{
  margin-top: 10px;
  text-align: right;
}

.post-list article img {
  max-width: 100%; /* 親要素の幅を超えない */
  height: auto;    /* 縦横比を維持 */
  display: block;  /* 余白調整のため */
  margin: 0 auto;  /* 中央寄せしたい場合 */
}


/* ↓↓シングルページ用css↓↓ */

.single-header h1{
  text-align: center;
  margin: 0 0 20px 20px; /* ← 左の余白を完全に0にする */
}

.single-main {
  width: 80%;
  margin: 0 auto;
}

.single-main h2 {
  font-weight: normal;
  text-align: left;
  margin: 0 0 20px 10px; /* ← 左の余白を完全に0にする */
}

.single-main p {
  font-weight: normal;
  text-align: left;
  margin: 0 0 20px 10px; /* ← 左の余白を完全に0にする */
}

.single-post .text {
  margin-top: 0;    /* 上の余白を削除 */
  margin-bottom: 0; /* 下の余白を小さくする */
}

.single-post figure {
  width: 70%;
  margin-bottom: 105px;
  margin-left: auto;  /* ← 左余白を自動にして右寄せ */
  margin-right: 0;
}

.single-post figure img {
  max-width: 100%; /* 親要素の幅を超えない */
  height: auto;    /* 縦横比を維持 */
  display: block;  /* 余白調整のため */
}

/* ▼縦向き写真専用 */
.single-post figure img.portrait {
  width: 66.7%; /* 横向き（1200x800）の比率を維持して縦向き化 */
  height: auto;
  margin: 0 auto;
}

.single-footer {
  text-align: right;
}

.single-footer a:hover {
  text-decoration: none;
}

/* ↑↑シングルページ用css↑↑ */


footer {
  margin: 0 auto;
  margin-top: 40px;
  padding: 20px 0;
  text-align: center;
}

/* PC画面のみのスクロール設定 */
@media all and (min-width: 1001px) {

}

/* タブレット向けレイアウト */
@media all and (max-width: 1000px)  { 

  body {
    padding: 10px;
  }

  header div {
    height: 250px;
  }

  main {
    width: 80%;
    margin: 0 auto;
  }

  .post-list {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 0 auto;
  }

  .post-list article {
    width: 90%;
    margin: 0 auto;
  }  

  .single-header h1 {
    text-align: left;
    margin-left: 15px; /* h2と同じ余白に調整 */
  }

  .single-main {
    width: 90%;
    margin: 0 auto;
  }

  .single-post figure {
    width: 85%;
    margin-bottom: 80px;
  }


}

/* スマホ向けレイアウト */
@media all and (max-width: 670px)  { 

  body {
    padding: 0;
  }

  header div {
    height: 140px;
  }

  main {
    width: 100%;
    margin: 0 ;
  }

  main article h3 {
  font-size: 16px;
  }
  
  .post-list .date {
    font-size: small;
 }

  .post-list {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 0 auto;
  }

  .post-list article {
    width: 100%;
    margin: 0 auto 50px;
  }  


/* ↓↓シングルページ用css↓↓ */

  .single-header h1 {
    text-align: left;
    margin-left: 0px; /* h2と同じ余白に調整 */
  }

  .single-main {
    width: 100%;
    margin: 0 ;
  }

  .single-post .date {
    font-size: small;
    text-align: right;
    margin-right: 5px;
  }
 
  .single-post .text {
    font-size: x-small;
    white-space: normal; /* 通常の折り返しに（念のため） */
  }

  .single-post .text br {
    display: none; /* <br> を非表示にして改行を解除 */
  }

  .single-post figure {
    width: 100%;
    margin-bottom: 70px;
  }

  .single-post figure img {
    width: 100%;
    height: auto;
    margin: 0;
  }

  .single-footer {
    text-align: center;
  }

/* ↑↑シングルページ用css↑↑ */



}