/*
Theme Name: My Custom Theme
Author: Your Name
Version: 1.0
Description: 自作HTMLベースの最小テーマ
*/

/* ========================
   共通
======================== */
html {
  font-family: "Shippori Mincho", serif;
  font-style: normal;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body, html {
  width: 100%;
  min-height: 100%;
}

body{
  overflow-x: hidden;
  background-color: #f5f5f5;
}

p, h1, h2, h3, a {
  color: #555;
}

a{
  text-decoration: none !important;

}

ul {
  list-style: none !important;
}

a:hover {
  opacity: 0.5;
}

img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

body.no-scroll {
  overflow: hidden;
  height: 100vh;
}

.scroll-fade {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-fade.active {
  opacity: 1;
  transform: translateY(0);
}

/* ヘッダー下から本文開始 + 横幅指定 */
body > *:not(header):not(footer) {
  margin-top: 100px !important;
}

/* ========================
   header（固定対応）
======================== */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 2000;
  transition: all 0.3s ease;
}

.container {
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 22px 22px;
}

.flex {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  align-items: center;
}

.flex a {
  color: #555;
  transition: color 0.3s ease;
}

/* .logo {
  font-size: 24px;
  font-weight: 400;
  letter-spacing: 0.2em;
  z-index: 1002;
  color: #555;
  transition: color 0.3s ease;
} */

/* ロゴリンク自体のサイズ調整 */
.logo {
  display: inline-block;   /* 横幅いっぱいに広がらないようにする */
  width: auto;             /* 必要なら固定幅にしてもOK */
  max-width: 65px;        /* 任意：ロゴ画像の最大幅 */
}

/* ロゴ画像の調整 */
.logo img {
  display: block;
  width: 100%;   /* .logo の幅に合わせる */
  height: auto;  /* アスペクト比維持 */
}

/* menu */
.menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.menu li {
  margin-left: 40px;
}

.menu a img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  display: block;
}

/* ========================
   ハンバーガー共通
======================== */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 22px !important;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 2000;
  transition: all 0.3s ease;
}

.hamburger span {
  display: block;
  height: 1.5px !important;
  background: #555;
  border-radius: 2px;
  width: 100%;
  transition: all 0.3s ease;
}

/* ハンバーガー開閉時 */
.hamburger.active span:nth-child(1) {
  transform: rotate(45deg);
  background: #fff;
  position: relative;
  top: 8px;
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg);
  background: #fff;
  position: relative;
  top: -8px;
}
.hamburger span:last-child {
  margin-bottom: 0;
}

/* ========================
   PC（1025px以上）
======================== */
@media (min-width: 1025px) {
  .menu {
    display: flex;
    position: static;
    flex-direction: row;
    align-items: center;
    background: none;
    height: auto;
    width: auto;
  }
  .menu ul {
    display: flex;
    flex-direction: row;
    align-items: center;
  }
  .menu li {
    margin-left: 40px;
  }

  /* PC専用ヘッダーエフェクト */
  /* header {
    background: #f5f5f5;
  }
  header .flex a,
  header .logo {
    color: #555;
  } */

  /* 50px以上スクロールしたとき */
  /* header.scrolled {
    background: transparent;
  }
  header.scrolled .flex a,
  header.scrolled .logo {
    color: #fff;
  } */
}

/* ========================
   SP・tablet（〜1024px）
======================== */
@media (max-width: 1024px) {
  .hamburger {
    display: flex;
  }
  .logo {
    color: #fff;
  }
  .menu {
    position: fixed;
    top: 0;
    right: -100%;
    width:  100%;
    height: 100vh;
    background: rgba(170, 170, 170, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: right 0.3s ease;
    z-index: 1999;
  }
  .menu.active {
    right: 0;
  }
  .menu a {
    color: #fff;
  }
  .menu ul {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .menu li {
    margin: 20px 0;
  }
}

/* ========================
   footer
======================== */
.footer {
  background-color: #adadad;
  padding: 40px 20px;
  text-align: center;
  font-size: 12px;
  margin-top: 50px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
}

.footer-links a {
  color: #fff;
}

.footer-sns {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin: 30px 0;
}

.footer-sns a img {
  width: 24px;
  height: 24px;
}

.footer-copy {
  color: #fff;
}

/* SP（768px以下） */
@media (max-width: 768px) {
  .footer {
    padding: 50px 20px;
    font-size: 13px;
    margin-top: 20px;
  }
  .footer-links {
    flex-direction: column;
    gap: 20px;
  }
}

/* ========================
  information
======================== */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 50px;
}

.post-thumbnail img {
  width: 100%;
  height: auto;
  display: block;
}

.post-meta {
  font-size: 0.9rem;
  color: #555;
  margin: 5px 0;
}

.post-title {
  font-size: 16px;
  margin: 5px 0;
}

.post-title a {
  text-decoration: none;
  color: #000;
}

.post-excerpt {
  font-size: 14px;
  color: #333;
}

@media (max-width: 768px) {
  .posts-grid {
    grid-template-columns: 1fr;
  }
}

.info-subcat {
  display: flex;
  gap: 10px;
  list-style: none;
  padding: 10px 0;
  margin: 0 0 20px 0;
  font-size: 0.85rem;
}

.info-subcat li a {
  color: #555;
  text-decoration: none;
  padding: 3px 8px;
  border: 1px solid #ccc;
  border-radius: 3px;
}

.info-subcat li a:hover,
.info-subcat li a.current-cat {
  background-color: #eee;
  border-color: #999;
}

/* 子カテゴリリンクの下に余白 */
.child-categories {
  margin-bottom: 20px; /* 上のコンテンツとの余白 */
  display: flex;
  flex-wrap: wrap;
  gap: 12px; /* リンク同士の隙間 */
}

.child-categories a {
  display: inline-block;
  color: #555;
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.9rem;
}

.child-categories a:hover {
  opacity: 0.5;
}
/* ページネーション中央揃え */
.pagination {
  margin-top: 40px; /* 上の余白 */
  text-align: center; /* 中央揃え */
}

.pagination a,
.pagination span {
  display: inline-block;
  margin: 0 5px; /* 左右の間隔 */
  text-decoration: none;
  color: #555;
}

.pagination a:hover {
  opacity: 0.5;
}