/* 基本設定 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: sans-serif;
  color: #010232;
  background-color: #fffde7;
  line-height: 1.5;
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: bottom;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

/* レイアウト幅 */
.main-content,
.header-inner,
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0;
}

/* ヘッダー */
.header {
  background-color: #fff;
  padding: 10px;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.logo img {
  max-height: 50px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 15px;
}

.nav ul {
  display: flex;
  gap: 15px;
  font-size: 14px;
  font-weight: bold;
}

.header-btn-group {
  display: flex;
  gap: 10px;
}

.btn {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: bold;
}

.btn-login {
  border: 2px solid #00a0e9;
  color: #00a0e9;
}

.btn-register {
  background-color: #ff3366;
  border: 2px solid #ff3366;
  color: #fff;
}

/* メインビジュアル */
.main-visual {
  margin-bottom: 30px;
  text-align: center;
}

.main-visual img {
  width: 100%;
  border-top: 2px solid #010232;
  border-bottom: 2px solid #010232;
}

/* セクション共通 */
.section {
  margin-bottom: 40px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-bottom: 2px dashed #ff9900;
  padding-bottom: 10px;
  margin-bottom: 20px;
}

.section-title {
  display: flex;
  align-items: baseline;
  gap: 15px;
}

.section-title h2 img {
  max-height: 35px;
  margin-left: 10px;
  margin-bottom: 5px;
}

.section-title p {
  text-indent: 1em;
  font-size: 14px;
  color: #666;
}

.btn-more {
  border: 1px solid #010232;
  padding: 4px 12px;
  margin-right: 10px;
  border-radius: 15px;
  font-size: 12px;
  background-color: #fff;
}

/* バッジカラー */
.badge,
.card-badge,
.genre-label {
  display: inline-block;
  color: #fff;
  font-weight: bold;
  border-radius: 12px;
  text-align: center;
}

.badge-red { background-color: #ff4b5c; }
.badge-blue { background-color: #00a0e9; }
.badge-orange { background-color: #ff9900; }
.badge-green { background-color: #00a86b; }
.badge-purple { background-color: #9b51e0; }
.badge-teal { background-color: #00b4d8; }

/* ポイント表示 */
.pt-tag {
  color: #ff3366;
  font-weight: bold;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.icon-p {
  background-color: #ffcc00;
  color: #fff;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  font-size: 12px;
}

.arrow-btn {
  background-color: #ff3366;
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  font-size: 14px;
}

/* 人気節約術（カードグリッド） */
.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  padding: 0 10px;
}

.card {
  background-color: #fff;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 10px;
}

.card-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  padding: 4px 12px;
  font-size: 12px;
  z-index: 1;
}

.card-img img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 10px;
}

.card-title {
  font-size: 14px;
  margin-bottom: 15px;
  flex-grow: 1;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ジャンル一覧 */
.genre-grid {
  padding: 0 10px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 15px;
}

.genre-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.genre-img {
  background-color: #fff;
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 8px;
  width: 100%;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.genre-label {
  width: 100%;
  padding: 4px 0;
  font-size: 13px;
}

/* ランキング */
.ranking-list {
  display: flex;
  flex-direction: column;
  padding: 0 10px;
  gap: 15px;
}

.ranking-item {
  background-color: #fff;
  border-radius: 10px;
  padding: 15px;
  display: flex;
  align-items: center;
  gap: 15px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.ranking-rank {
  font-size: 24px;
  font-weight: bold;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  flex-shrink: 0;
}

.rank-1 { background-color: #ffcc00; }
.rank-2 { background-color: #aaa; }
.rank-3 { background-color: #b87333; }

.ranking-thumb {
  width: 120px;
  flex-shrink: 0;
}

.ranking-thumb img {
  border-radius: 10px;
}

.ranking-body {
  flex-grow: 1;
}

.ranking-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 5px;
}

.ranking-title {
  font-size: 16px;
}

.ranking-title-wrap .badge {
  font-size: 11px;
  padding: 2px 8px;
}

.ranking-desc {
  font-size: 12px;
  color: #666;
}

.ranking-side {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-shrink: 0;
}

/* フッター */
.footer {
  background-color: #00a0e9;
  color: #fff;
  margin-top: 50px;
  position: relative;
}

.footer-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.footer-logo img {
  max-height: 80px;
}

.social-links {
  display: flex;
  gap: 15px;
}

.sns-icon {
  display: inline-block;
  width: 36px;
  height: 36px;
  background-color: #fff;
  color: #00a0e9;
  border-radius: 50%;
  text-align: center;
  line-height: 36px;
  font-size: 10px;
  font-weight: bold;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 12px;
}

.copyright {
  background-color: #0080bc;
  text-align: center;
  padding: 10px 0;
  font-size: 11px;
}

/* スマホ表示向けレスポンシブ対応 */
@media (max-width: 768px) {
  
  .nav ul {
    display:none;

  }

  .section-title {
    flex-direction: column;
    gap: 0;
  }

  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .genre-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .ranking-item {
    flex-wrap: wrap;
  }

  .ranking-body {
    width: 100%;
    order: 3;
  }

  .ranking-side {
    margin-left: auto;
  }

  /* フッターナビを2列のボタン風デザインに変更 */
  .footer-nav {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    width: 100%;
    padding: 0 10px;
  }

  .footer-nav li a {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 44px;
    padding: 8px 10px;
    background-color: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    font-size: 13px;
    color: #fff;
    text-align: center;
  }

  /* 11個目の項目（奇数番目）を中央の横一杯に配置 */
  .footer-nav li:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}