/* ========================================
   style.css - シンプル日記サイト（スクールデザイン風）
   最終更新：ロゴ下にソーシャルリンク配置、トップへ戻るボタン追加
======================================== */

/* リセット + 基本設定 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Noto Sans JP", system-ui, -apple-system, sans-serif;
  background: #f8f9fc;
  color: #2d2d2d;
  line-height: 1.82;
  font-size: 1.05rem;
}

/* 中央寄せコンテナ */
.container {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 1.2rem;
}

/* ヘッダー全体 */
header {
  background: linear-gradient(to bottom, #e3f2fd, #f8f9fc);
  padding: 2.5rem 0 2rem;
  text-align: center;
  border-bottom: 1px solid #d0e0f0;
}

.logo {
  max-width: 100%;
  height: auto;
  margin-bottom: 1.2rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

header h1 {
  font-family: "Noto Serif JP", Georgia, serif;
  font-size: 2.4rem;
  font-weight: 700;
  color: #1a3c5e;
  margin-bottom: 0.5rem;
}

header p {
  font-size: 1.1rem;
  color: #555;
  margin-bottom: 1.2rem;
}

/* ヘッダー内のソーシャルリンク（ロゴの下に配置） */
.social-links.header-links {
  margin: 0.8rem 0 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

/* 記事 */
.entry {
  margin: 3.5rem 0;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid #e0e7ef;
}

.entry time {
  display: block;
  color: #5c7a9b;
  font-size: 0.95rem;
  margin-bottom: 0.8rem;
  font-weight: 500;
}

.entry h2 {
  font-family: "Noto Serif JP", Georgia, serif;
  font-size: 1.95rem;
  line-height: 1.38;
  color: #1a3c5e;
  margin: 0.8rem 0 1.6rem;
}

/* 本文 */
.content {
  font-size: 1.08rem;
  text-align: left;
  margin: 0;
  padding: 0;
}

.content p {
  margin-bottom: 1.6rem;
  hyphens: auto;
}

/* 引用ブロック */
.quote {
  margin: 1.8rem 0;
  padding: 1.2rem 1.6rem;
  background: #f0f4f8;
  border-left: 5px solid #5c7a9b;
  font-style: italic;
  color: #444;
  line-height: 1.7;
}

/* 写真 */
.photo {
  margin: 2.2rem auto;
  text-align: center;
  max-width: 100%;
}

.photo img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}

.photo figcaption {
  margin-top: 0.9rem;
  font-size: 0.92rem;
  color: #5c7a9b;
  font-style: italic;
}

/* ソーシャルリンク（記事内用・ヘッダー用共通） */
.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.link-btn {
  display: inline-block;
  padding: 0.65rem 1.4rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.98rem;
  transition: all 0.22s;
  color: white;
}

.note     { background: #41c9b9; }
.note:hover     { background: #33b5a8; transform: translateY(-2px); }
.x       { background: #000; }
.x:hover       { background: #111; transform: translateY(-2px); }
.insta   { background: #e1306c; }
.insta:hover   { background: #c13584; transform: translateY(-2px); }
.youtube { background: #ff0000; }
.youtube:hover { background: #cc0000; transform: translateY(-2px); }

/* 最初に戻るボタン */
#back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #1a3c5e;
  color: white;
  border: none;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  z-index: 999;
}

#back-to-top.show {
  opacity: 1;
  visibility: visible;
}

#back-to-top:hover {
  background: #2a5c8e;
  transform: translateY(-4px);
}

/* フッター */
footer {
  background: #1a3c5e;
  color: #d0e0f0;
  text-align: center;
  padding: 2.5rem 0;
  margin-top: 4rem;
}

footer p {
  font-size: 0.9rem;
}

/* レスポンシブ対応 */
@media (max-width: 680px) {
  header h1 {
    font-size: 2.1rem;
  }
  .entry h2 {
    font-size: 1.75rem;
  }
  .content {
    font-size: 1.04rem;
  }
  .social-links,
  .header-links {
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
  }
  #back-to-top {
    width: 54px;
    height: 54px;
    font-size: 1.1rem;
    bottom: 20px;
    right: 20px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }
  header {
    padding: 2rem 0 1.5rem;
  }
  .logo {
    margin-bottom: 1rem;
  }
}

.top-nav {
  margin: 1.5rem 0;
}

.bottom-nav {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid #ddd;
}

.top-link {
  font-family: "Noto Sans JP", sans-serif;
  font-size: 0.9rem;
  color: #444;
  text-decoration: none;
}

.top-link:hover {
  text-decoration: underline;
}





/* 本文中リンク：下線なし */
.content a {
  color: #1f4e79;              /* 知的な深めブルー */
  text-decoration: none;       /* アンダーラインなし */
  font-weight: 500;
  padding: 0 2px;
  border-radius: 3px;
  transition:
    color 0.25s ease,
    background-color 0.25s ease,
    padding 0.2s ease;
}

/* マウスオーバーで目立たせる */
.content a:hover {
  color: #0b3558;
  background-color: rgba(31, 78, 121, 0.18);
  padding: 0 6px;
}