@charset "utf-8";

/* ===== ベース設定 ===== */
html {
  font-size: 100%;
}

body {
  font-family: 'Noto Sans JP', 'Meiryo', 'メイリオ', sans-serif;
  width: 100%;
  background-color: #f4f9f4;
  color: #2e4d3c;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ===== ヘッダー ===== */
header {
  background-color: #a3c9a8;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

header h1 img {
  padding: 5px 0px;
  display: block;
  margin: auto;
}

/* ===== フッター ===== */
footer {
  background-color: #c1d0c7;
  text-align: center;
  padding: 5px 0px 70px 0px;
  color: #2e4d3c;
}

footer small {
  color: #555;
}

/* ===== 下部ナビ（スマホ表示用） ===== */
#bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-around;
  align-items: center;
  background-color: #6da06d;
  border-top: 1px solid #c1d0c7;
  padding: 15px 0;
  z-index: 1000;
}

#bottom-nav button,
#bottom-nav a {
  background: none;
  border: none;
  font-size: 1rem;
  color: #fff;
  text-decoration: none;
}

/* ===== ドロワー（共通） ===== */
.drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 300px;
  background: #fff;
  z-index: 1000;
  transition: transform 0.3s ease, opacity 0.3s ease;
  overflow-y: auto;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  padding: 20px;
}

.drawer.left {
  left: 0;
  transform: translateX(-100%);
}

.drawer.left.open,
.drawer.open.left {
  transform: translateX(0);
}

.drawer.right {
  right: 0;
  transform: translateX(100%);
}

.drawer.right.open,
.drawer.open.right {
  transform: translateX(0);
}

/* ===== 左ドロワー専用スタイル ===== */
#menu-drawer {
  color: #2e4d3c;
}

#menu-drawer h3{
  font-size: 2em;
  margin-top: 60px;
}

#menu-drawer .toggle-year {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  margin-bottom: 5px;
  font-size: 1rem;
  background-color: #f8f8f8;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

#menu-drawer .toggle-year:hover {
  background-color: #b1d8a3;
}

#menu-drawer .month-list {
  padding-left: 1em;
  list-style: none;
  margin-bottom: 15px;
}

#menu-drawer .month-list a {
  display: block;
  padding: 6px 12px;
  color: #2e4d3c;
  text-decoration: none;
  font-size: 0.95rem;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

#menu-drawer .month-list a:hover {
  background-color: #d8f0d0;
}

/* ===== オーバーレイ ===== */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 900;
  transition: opacity 0.3s ease;
  opacity: 0;
  pointer-events: none;
}

.overlay:not(.hidden) {
  opacity: 1;
  pointer-events: auto;
}

.overlay.hidden {
  display: none;
}

/* ===== プロフィール／お問い合わせ/サイトポリシー ===== */
.profile-box {
  margin-top: 20px;
  text-align: center;
}

.profile-img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
}

.profile-text {
  font-size: 0.9rem;
  color: #2e4d3c;
  margin-top: 10px;
}

.contact-wrapper {
  margin-top: 30px;
  text-align: center;
}

.contact-link {
  display: inline-block;
  background-color: #a3c9a8;
  color: #fff;
  padding: 10px;
  border-radius: 6px;
  text-decoration: none;
  transition: background-color 0.3s ease;
  margin: 20px 0px;
}

.contact-link:hover {
  background-color: #6da06d;
}

/* ===== サイドバー記事表示（人気・ランダム） ===== */
#sidebar-drawer h3 {
  font-size: 2em;
}

#sidebar-drawer h4 {
  font-size: 2em;
  color: #2e4d3c;
  border-bottom: 5px solid #4CAF50;
  margin-top: 50px;
}

#sidebar-drawer h4:first-of-type {
  margin-top: 0;
}

#sidebar-drawer h3.menu-section-title:nth-of-type(2) {
  margin-top: 60px;
}

#popular-list li,
#right-random-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #e0eee0;
  padding: 10px 0px 10px 10px;
}

.thumb-img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.text-block {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.sidebar-title {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
  color: #2e4d3c;
  margin-bottom: 4px;
}

.sidebar-date {
  font-size: 0.7rem;
  color: #555;
}

#right-random-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

/* 左ドロワー */
.menu-section-title {
  font-size: 1.2rem;
  font-weight: bold;
  color: #2e4d3c;
  position: relative;
  padding-bottom: 8px;
  margin-bottom: 20px;
}

.menu-section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  background-color: #4CAF50;
}

.month-list li a {
  display: block;
  padding: 10px 16px;
  background-color: #f8f8f8;
  color: #2e4d3c;
  text-decoration: none;
  border-radius: 8px;
  font-size: 0.95rem;
  box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.05);
  transition: background-color 0.3s ease, transform 0.3s ease;
  margin-bottom: 8px;
}

.month-list li a:hover {
  background-color: #d8f0d0;
  transform: translateX(6px);
}

#year-list,
#year-list li {
  list-style: none;
}

#year-list {
  margin-bottom: 50px;
}

#category-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

#category-list li {
  list-style: none;
}

#category-list li::marker {
  content: none;
}

#category-list li a {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  background-color: #f8f8f8;
  color: #2e4d3c;
  padding: 5px 7px;
  border-radius: 6px;
  text-decoration: none;
  box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.05);
  transition: background-color 0.3s ease, transform 0.3s ease;
  margin-bottom: 10px;
  position: relative;
  height: 60px;
}

#category-list li a:hover {
  background-color: #e0f7e9;
  color: #1b5e20;
  transform: translateX(6px);
}

.tag-label {
  display: flex;
  align-items: center;
  font-weight: bold;
  font-size: 1rem;
}

.icon {
  margin-right: 6px;
  margin-top: 2px;
  display: inline-block;
}

.count {
  position: absolute;
  bottom: 8px;
  right: 12px;
  font-size: 0.85rem;
  color: #555;
}

/* ===== その他 ===== */
.page-title {
  text-align: center;
  margin: 0 auto 10px;
  padding: 30px 0px;
  font-size: 1.5em;
  line-height: 1.4;
}

html.lock-scroll,
body.lock-scroll,
.lock-scroll {
  overflow: hidden !important;
  height: 100%;
  position: relative;
}

.excerpt {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  line-height: 1.5;
  max-height: 3em;
}

article h2 {
  text-align: center;
  margin-bottom: 30px;
  font-size: 1.4em;
  line-height: 1.4;
}

article > p:last-of-type {
  text-align: center;
  margin-top: 40px;
  font-size: 0.9em;
}

.rank-badge {
  width: 36px;
  font-size: 1rem;
  font-weight: bold;
  text-align: center;
  margin-right: 6px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2e4d3c;
}

@media screen and (min-width: 1200px) {
  .drawer.left,
  .drawer.right {
    transform: translateX(0%) !important;
  }

  .overlay {
    display: none !important;
  }

  #bottom-nav {
    display: none;
  }

  /* ===== フッター ===== */
  footer {
    padding: 5px 0px 200px 0px;
  }
}
