* {
  box-sizing: border-box;
}

body {
  font-family: "Noto Sans JP", sans-serif;
  margin: 0;
  padding: 0;
  background: #fff;
  color: #333;
  padding-top: 130px; /* 固定ヘッダー分 */
}

/* ===== ヘッダー ===== */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: #f5f5f5;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  z-index: 1000;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 24px;
}

.site-banner {
  width: 220px;
  height: auto;
  display: block;
  margin: 0 auto; /* 中央寄せ */
}

.site-title {
  text-align: center;
  margin: 10px 0;
}

.site-title a {
  text-decoration: none;
}


.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

header form {
  display: flex;
  align-items: center;
  gap: 8px;
}

header form input {
  padding: 6px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

header form button {
  padding: 6px 10px;
  background: #333;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

/* ハンバーガー */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 25px;
  height: 18px;
  cursor: pointer;
}
.hamburger span {
  display: block;
  height: 3px;
  background: #333;
  border-radius: 2px;
}

/* PCナビ */
.desktop-nav {
  border-top: 1px solid #ddd;
}
.desktop-nav ul {
  display: flex;
  justify-content: center;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 10px 0;
}
.desktop-nav a {
  text-decoration: none;
  color: #333;
  font-weight: bold;
}

/* モバイルナビ */
.mobile-nav {
  display: none;
}
.mobile-nav.open {
  display: block;
}
.mobile-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.mobile-nav a {
  display: block;
  padding: 10px 20px;
  color: #333;
  text-decoration: none;
  border-top: 1px solid #ddd;
}

/* ===== セクション ===== */
section {
  padding: 40px 20px;
  max-width: 1000px;
  margin: 0 auto;
}


/* ===== フッター ===== */
footer {
  text-align: center;
  padding: 20px;
  background: #f5f5f5;
  font-size: 0.9em;
  color: #666;
}

/* ===== カード ===== */
.cards {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

/* カードの幅を固定サイズにする */
.cards a {
  display: block;
  width: 250px;  /* カード幅固定 */
  text-align: center;
  text-decoration: none;
  color: #333;
  border: 1px solid #ddd;
  border-radius: 5px;
  padding: 10px;
  overflow: hidden; /* はみ出した部分を隠す */
  transition: transform 0.2s, box-shadow 0.2s;
}

.cards a:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* 画像はカード幅に合わせて縮小、縦横比維持 */
.cards img {
  max-width: 100%;
  height: auto;     /* アスペクト比を維持して縮む */
  display: block;
  border-radius: 5px;
  margin-bottom: 10px;
}




/* ===== スマホ対応 ===== */
/* スマホ対応 */
@media (max-width: 768px) {
  .desktop-nav {
    display: none;
  }

  .header-top {
    flex-direction: column; /* 縦並び */
    align-items: flex-start; /* 左寄せ */
    gap: 10px;
    padding: 10px 20px;
  }

  .header-right {
    width: 100%;
    display: flex;
    justify-content: space-between; /* 検索とハンバーガーを左右に */
  }

  .hamburger {
    display: flex;
  }

  .mobile-nav {
    display: none;
    flex-direction: column;
    width: 100%;
  }

  .mobile-nav.open {
    display: flex;
  }

  .cards a {
    width: calc(50% - 10px);
  }
}

@media (max-width: 480px) {
  .cards a {
    width: 100%;
  }
}

