@charset "UTF-8";

/* ダーク/ライトモード変数 */
:root {
  --text-main: #24292e;
  --text-body: #333;
  --text-muted: #666;
  --text-faint: #888;
  --bg-main: #ffffff;
  --border-color: #eee;
  --border-dark: #c8c8c8;
  --link-color: var(--link-color);
  --accent-color: var(--text-body);
  --category-bg: #333;
  --category-text: #fff;
}

body.dark-mode {
  --text-main: #e0e0e0;
  --text-body: #d0d0d0;
  --text-muted: #aaaaaa;
  --text-faint: #888888;
  --bg-main: #1a1a1a;
  --border-color: #444;
  --border-dark: #555;
  --link-color: #7ab3ff;
  --accent-color: #aaaaaa;
  --category-bg: #555;
  --category-text: #eee;
}
/*====================
スマホを基本設計にする
 - 〜479px：スマートフォン縦
 - 480px〜599px：スマートフォン横
 - 600px〜959px：タブレット
 - 960px〜1279px：小型PC
 - 1280px〜：大型PC
====================*/
/* サイト全体のすべてのリンク（aタグ）に適用 */
a {
  text-decoration: none; /* 下線を消す */
  color: inherit;       /* 親要素の色を引き継ぐ（基本は黒系になります） */
  transition: opacity 0.3s; /* ついでにすべてのリンクをふわっとさせるとオシャレ */
}

/* マウスが乗ったときの設定（一括） */
a:hover {
  opacity: 0.7; /* どのリンクもマウスを乗せると少し薄くなる */
}
html {
  font-size: 100%;
  scroll-behavior: smooth;
}

body {
  color: var(--text-main);
  font-family:  "Meiryo", sans-serif;;
}

a {
  text-decoration: none;
}

p {
  font-size: 1.3rem;
}

img {
  max-width: 100%; /* スマホサイズでも画像が縮小される。 */
}

li {
  list-style: none;
  font-size: 1.2rem;
}

/* wrapperは共通 */
.wrapper {
  max-width: 960px;
  margin: 0 auto 130px auto;
  font-size: 0.9rem; /* root em 最上位階層のHTML要素であるHTMLの文字サイズを基準とした相対値。HTMLの文字サイズを変更することで全体の文字サイズも変更できる */
  padding: 0 4%;
}

.site-title {
  line-height: 1px;
  font-weight: 600;
  font-size: 2.4rem;
}

.site-title a {
  display: block;
  color: var(--text-main);
}

.sec-title {
  font-size: 1.5rem;
  text-align: center;
  margin-bottom: 65px;
}

/*----------------------------------------------
ヘッダー
------------------------------------------------*/
#header {
  max-width: 960px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 170px;
  margin: 0 auto;
  padding: 0 4%;
}

#header ul {
  display: flex;
  padding: 10px 0;
  align-items: center;
}

#header li {
  font-size: 0.9rem;
  margin-left: 30px;
}

header li a {
  color: var(--text-main);
  transition: all 0.3s;
}


#header li img.icon {
  width: 30px;
}

/*-------------------------------------------
Mainvisual
-------------------------------------------*/
#mainvisual {
  margin-bottom: 80px;
}

#mainvisual img {
  width: 100%;
  max-width: 1920px;
  height: 400px;
  object-fit: cover;
}

/*-------------------------------------------
About
-------------------------------------------*/
#about ul {
  margin-bottom: 30px;
}

#about ul li {
  margin-bottom: 3px;
}

#about ul li:first-child {
  margin-bottom: 30px;
}

#about p {
  text-align: center;
  margin-bottom: 10px;
  font-size: 0.95rem;
}

/*-------------------------------------------
Works
-------------------------------------------*/
#works ul {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 50px;
}
#works ul li {
  width: 25%;
  margin-bottom: 23px;
  }
/* 2. 画像の「窓」の設定（ここに移す） */
.img-box {
  width: 100%;
  aspect-ratio: 3 / 4; /* ここで画像の形を固定 */
  overflow: hidden;    /* ★画像のはみ出しだけをここでカット */
  border-radius: 8px;
}

/* 3. 画像自体の設定 */
.img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}

/* 「aタグにマウスが乗ったら中の画像がズーム」という指定に変更 */
.work-link:hover img {
  transform: scale(1.1);
}

/* 5. テキストの設定（復活！） */
.work-info {
  padding-top: 10px;
}
.work-title {
  font-weight: bold;
}
.work-desc {
  font-size: 0.85rem;
} 
#works ul li img {
  cursor: pointer;
  width: 100%;
  height: 100%;     /* max-heightよりheight: autoの方が安定します */
  object-fit: cover;  /* ★重要：ズームしても枠内で綺麗に収まるようにする */
  display: block;   /* 画像の下にできる数ミリの隙間を消します */
  transition: transform 0.3s, opacity 0.3s; /* ★整理：transformに効かせます */
}

/* テキスト全体の囲み */
.work-info {
  padding: 20px 5px; /* 上下に少し余白を作る */
  text-align: left;    /* 左寄せ（中央がよければ center に） */
}
/* 1行目：タイトル */
.work-title {
  font-weight: bold;   /* 太字にする */
  font-size: 1.3rem;   /* 少し大きく */
  margin-bottom: 5px;  /* 説明文との隙間 */
  display: block;
}
/* 2行目：説明文 */
.work-desc {
  font-size: 0.85rem;  /* 小さくする */
  color: var(--text-muted);         /* 少し色を薄くするとメリハリが出ます */
  line-height: 1.4;    /* 行間を少し詰めて説明文らしく */
}
/*-------------------------------------------
News
-------------------------------------------*/
#news dl {
  display: flex;
  flex-wrap: wrap;
  border-top: solid 1px var(--border-dark);
  margin-bottom: 20px;
}

#news dt {
  width: 20%;
  border-bottom: solid 1px var(--border-dark);
  padding: 15px;
}

#news dd {
  width: 80%;
  border-bottom: solid 1px var(--border-dark);
  padding: 15px;
}

/* 記事一覧セクション */
#news {
  margin-top: 80px; /* 上のセクションとの間隔 */
}

.news-list {
  list-style: none;
  padding: 0;
  max-width: 800px; /* 広がりすぎないように制限 */
  margin: 0 auto;   /* 中央寄せ */
}

.news-list li {
  border-bottom: 1px solid var(--border-color); /* 下線をつけて区切りやすく */
}

.news-list a {
  display: flex;       /* カテゴリーとタイトルを横に並べる */
  padding: 15px 10px;
  text-decoration: none;
  color: var(--text-body);
  transition: background 0.3s;
}

 .news-list a:hover {
  opacity: 0.5;

}

/* カテゴリーラベル */
.news-list .category {
  font-size: 0.75rem;
  background: var(--category-bg);
  color: var(--category-text);
  padding: 2px 10px;
  border-radius: 3px;
  margin-right: 20px;
  min-width: 100px;   /* 幅を揃えるときれいに見えます */
  text-align: center;
  align-self: center; /* 縦方向の中央寄せ */
}

/* タイトル */
.news-list .title {
  flex: 1;            /* 残りの幅をすべて使う */
  font-size: 1rem;
}
/*-------------------------------------------
Contact
-------------------------------------------*/

#contact p {
  text-align: center;
  margin-bottom: 10px;
  font-size: 0.9rem;
}

#contact dl {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

#contact dt {
  width: 15%;
}

#contact dd {
  width: 85%;
  margin-bottom: 10px;
}

#contact dd input,
#contact dd textarea {
  width: 100%;
  border: solid 1px var(--border-dark);
  padding: 10px;
}

#contact dd textarea {
  height: 10rem;
}

#contact .button {
  text-align: center;
}

#contact .button input {
  border: solid 1px var(--text-main);
  width: 200px;
  background-color: var(--text-main);
  color: var(--category-text);
  padding: 15px 0;
  transition: all 0.3s;
}

#contact .button input:hover {
  background: var(--bg-main);
  color: var(--text-main);
}
/*----------------------------------------------
SP
------------------------------------------------*/
/* pcファースト　大きいサイズから小さいサイズへ */
/* 600pxより小さいときのcss適用 */
@media screen and (max-width: 600px) {
  .wrapper {
    margin-bottom: 70px;
  }

  .site-title {
    margin-top: 20px;
  }

  .sec-title {
    margin-bottom: 40px;
  }

  /* ヘッダー */
  #header {
    max-width: 100%;
    height: auto;
    flex-direction: column;
    margin-top: 20px;
    line-height: 40px;
  }

  #header li {
    font-size: 0.8rem;
    margin-left: 20px;
  }

  #header li:first-child {
    margin-left: 0;
  }

  #header li img.icon {
    width: 20px;
    margin-top: 15px;
  }

  /* works */
  #works ul {
    flex-direction: column;
  }

  #works ul li {
    width: 100%;
  }

  
  /* contact */
  #contact dl {
    flex-direction: column;
  }

  #contact dt {
    width: 100%;
    margin-bottom: 5px;
  }
  #contact dd {
    width: 100%;
  }
}
/* ------------------------------------------
   記事ページ（ひな形）用の設定
   ------------------------------------------ */

/* 記事全体の幅と余白 */
.post-detail {
  padding: 10px 0; /* 上下の余白を60→10pxに大幅カット */
  max-width: 800px; 
  margin: 0 auto;
}

/* 記事の大見出し（タイトル） */
.post-title {
  font-size: 2rem;
  margin-bottom: 40px;
  font-weight: bold;
}

/* 本文の文字サイズと行間 */
/* 1. 本文（pタグ）のサイズを強制的に変える */
.post-content p {
  font-size: 1.0rem !important; /* 好みのサイズに。!importantで確実に上書き */
  font-family: sans-serif;
  line-height: 1.8;
  margin-bottom: 1.5rem;
  color: var(--text-body);
}

/* 2. 見出し（h1, h2）のサイズを個別に守る */
/* これを書くことで、親の設定に引っ張られなくなります */
.post-content h1 {
  font-size: 1.8rem !important; 
  margin-top: 40px;
  font-weight: bold;
}

.post-content h2 {
  font-size: 1.4rem !important;
  margin-top: 30px;
  border-left: 5px solid var(--accent-color);
  padding-left: 15px;
}
/* 本文内のh1, h2, pタグが勝手に持ってる上の余白をゼロにする */
.post-content h1,
.post-content h2,
.post-content p {
  margin-top: 0 !important; /* 強制的に上の余白を消す */
  margin-bottom: 1.5rem;    /* 下だけに余白を作る（これでパンくずとの間が詰まる） */
}

/* ついでに本文全体の文字色と行間を整える */
.post-content {
  color: var(--text-body) !important; /* 赤色テストが終わったらこれ。!importantでIDに勝つ */
  line-height: 1.8;
}

/* 記事内の見出し（h2）の装飾 */
.post-content h2 {
  border-left: 5px solid var(--accent-color);
  padding-left: 15px;
  margin: 50px 0 20px;
}

/* 記事内の画像がはみ出さないように */
.post-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 30px auto;
}
.post-content a {
  text-decoration: none; /* 下線を消す */
  color: var(--link-color);       /* 親要素の色を引き継ぐ（基本は黒系になります） */
  transition: opacity 0.3s; /* ついでにすべてのリンクをふわっとさせるとオシャレ */
}


/* 戻るボタンのエリア */
.back-link {
  margin-top: 80px;
  text-align: center;
}

.back-link a {
  color: var(--text-muted);
  text-decoration: none;
}

.back-link a:hover {
  text-decoration: underline;
}
/* パンくずリスト */
.breadcrumb {
  padding: 20px 0 0;
  margin: 0 auto;       /* 上下は0、左右はautoで中央寄せ */
  max-width: 800px;     /* 本文（.post-detail）と同じ幅に合わせる */
  font-size: 0.85rem;
  color: var(--text-faint);
}

.breadcrumb a:hover {
  text-decoration: underline;
}
/* footer */
.footer {
  font-size: 0.85rem;
}
