/* 基本設定 */
body {
  margin: 0;
  font-family: "Noto Sans JP", sans-serif;
}

.site-header {
  width: 100%;
  background-color: #fff;
  border-bottom: 2px solid #ddd;
  position: relative;
}

/* --- 上段（ロゴ・タイトル・ログイン・メニュー） --- */
.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 40px;
}

.logo-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  width: 50px;
  height: auto;
}

.site-title {
  font-size: 32px;
  color: #8b1e1e;
  font-weight: 800;
  letter-spacing: 1px;
  margin: 0;
}

/* --- 右上エリア --- */
.header-right {
  display: flex;
  align-items: center;
  gap: 15px;
  position: relative;
}


/* --- ナビゲーションメニュー --- */
.nav-menu {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  padding: 15px 0;
  border-top: 1px solid #eee;
  background-color: #fff;
  transition: max-height 0.3s ease-out;
}

.nav-menu a {
  text-decoration: none;
  font-size: 18px;
  font-weight: 700;
  color: #222;
  transition: color 0.2s;
}

.nav-menu a:hover {
  color: #8b1e1e;
}

/* --- ハンバーガーボタン --- */
.menu-toggle {
  display: none;
  font-size: 26px;
  background: none;
  border: none;
  cursor: pointer;
  color: #8b1e1e;
}

/* --- レスポンシブ --- */
@media (max-width: 768px) {
  .header-top {
    padding: 15px 20px;
  }

  .site-title {
    font-size: 22px;
  }

  /* ハンバーガーボタン（左上固定） */
  .menu-toggle {
    display: block;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 210;
    font-size: 28px;
    background: none;
    border: none;
    cursor: pointer;
    color: #8b1e1e;
  }


  /* ナビメニュー */
  .nav-menu {
    flex-direction: column;
    align-items: center;
    gap: 15px;
    opacity: 0;
    transform: translateY(-10px);
    max-height: 0;
    overflow: hidden;
    pointer-events: none;
    transition: all 0.3s ease;
    border-top: none;
  }

  /* メニュー開いた状態 */
  .nav-menu.active {
    opacity: 1;
    transform: translateY(0);
    max-height: 300px;
    pointer-events: auto;
    border-top: 1px solid #eee;
    background-color: #fff;
    padding: 15px 0;
  }
}



/* 今週の事務局の推し！ */
.pickup {
  padding: 30px 20px;
  max-width: 1600px;   /* 全体の幅を制御 */
  margin: 0 auto;      /* 中央寄せ */
}



/* プロジェクト一覧 */
.projects {
  padding: 30px 20px;
  max-width: 1600px;   /* 全体の幅を制御 */
  margin: 0 auto;      /* 中央寄せ */
}


.projects h2 {
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* PC時は4列固定 */
  gap: 20px;
}

/* プロジェクトカード */
.project-card {
  /*border: 2px solid #a00;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;*/
      width: 480px;
      margin: 2em auto;
      border-right:10px solid #922;
      border-bottom:10px solid #922;
      border-left:1px solid #922;
      border-top:1px solid #922;
      padding-left:10px;
      padding-right:10px;
      padding-bottom:4px;
}

.project-card h3 {
  display: -webkit-box;
  -webkit-line-clamp: 2;     /* 最大2行 */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;          /* 行間を調整 */
  max-height: calc(1.4em * 2); /* 2行分の高さ */
  cursor: pointer;
}

.project-card h3:hover {
  -webkit-line-clamp: unset;  /* ホバー時に全文表示 */
  max-height: none;
  white-space: normal;
  background: #fff;           /* 読みやすい背景 */
  position: relative;
  z-index: 10;
}

.project-img {
  width: 100%;
  height: 240px;
  /*object-fit: cover;*/  /* 縦長は上下を切る、横長は1200ピクセルもあると左右を切られる*/
  object-fit: contain;  /* 縦長、横長ともに全体を表示　background-colorも必要 */
  background-color: #fff; /* 足りない部分は白で埋める */
}


.project-content {
  padding: 15px;
}

.project-content h3 {
  margin: 0 0 10px;
  font-size: 1.2rem;
  color: #a00;
}

.fancy-link {
  color: #a00;
  text-decoration: none;
  transition: color 0.3s;
}
.fancy-link:hover {
  color: rgb(16, 16, 130);
  text-decoration: underline;
}

.project-content p {
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-bottom: 5px;
}

.progress-bar {
  background: #eee;
  border-radius: 5px;
  overflow: hidden;
  height: 10px;
  margin-bottom: 15px;
}

.progress {
  background: #a00;
  height: 100%;
  transition: width 0.3s ease;
}

.support-btn {
  display: block;
  text-align: center;
  background: #fff;
  color: #a00;
  padding: 10px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
}

.support-btn:hover {
  background: #800;
}


/* スマホ対応：1列中央寄せ */
@media (max-width: 768px) {
  .project-grid {
    grid-template-columns: 1fr; /* スマホ時は1列 */
    justify-items: center;      /* カードを中央に */
  }

  .project-card {
    width: 90%;
    max-width: 350px;  /* スマホで広がりすぎないように */
  }
}

/* タブレット対応：2列 */
@media (min-width: 769px) and (max-width: 1024px) {
  .project-grid {
    grid-template-columns: repeat(2, 1fr); /* タブレットは2列 */
  }
}



/* フッター */
footer {
  background: #a00;
  color: #fff;
  padding: 15px 20px;
  text-align: center;
}

footer nav {
  margin-bottom: 10px;
}

footer nav a {
  color: #fff;
  margin: 0 10px;
  text-decoration: none;
  font-size: 0.9rem;
}

/* サポーター企業 */
.supporters {
  background: #eee;
  padding-top: 10px;
  padding-bottom: 30px;
  padding-left: 50px;
}

.supporters h3 {
  margin-bottom: 10px;
}

.supporter-logos {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  /*padding-left: 50px;*/
  justify-content: center; /* 横方向の中央揃え */
  padding-left: 0; /* 左寄せを解除 */
}

.supporter-logos img {
  width: 300px;
  height: auto;
  background: #aaa;
  margin-left: 30px;
}

/* スマホ対応 */
@media (max-width: 768px) {
  header nav {
    display: none; /* 必要ならハンバーガーメニューに */
  }

  .hero h1 {
    font-size: 2rem;
  }

  .project-grid {
    grid-template-columns: 1fr; /* スマホ時は縦1列 */
  }

  .supporter-logos {
    justify-content: center;
  }
}


/* フッター */
.undermenu {
  background: #a00;
  color: #fff;
  padding: 15px 20px;
  text-align: center;
}

section nav {
  margin-bottom: 10px;
}

section nav a {
  color: #fff;
  margin: 0 10px;
  text-decoration: none;
  font-size: 0.9rem;
}

/* チャレンジャー名 */
.chr_name {
  color: #5f2121;
  font-size: 1.5rem;
  font-weight: 900;
}

/* ハッシュタグ */
.hashtag {
  color: #4551d8;
}


/* マイページボタン */
.mypage-btn {
  background-color: #8b1e1e;
  color: #fff;
  text-decoration: none;
  padding: 5px 20px;
  border-radius: 40px;
  font-weight: bold;
  transition: background-color 0.2s, transform 0.1s;
}

.mypage-btn:hover {
  background-color: #a22b2b;
  transform: scale(1.03);
}

  /* ログインボタン（右上固定） スクロールするとついてくる　フロート*/
  /*.login-btn {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 200;
    font-size: 14px;
    padding: 8px 18px;
    background-color: #8b1e1e;
    border-radius: 40px;
    color: #fff;
    text-decoration: none;
  }*/



/* トップページのログアウトボタン */
.logout-button {
  padding: 0.5em 1em;
  background-color: #e53935;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
@media (max-width: 700px) {
  .logout-button {
    padding: 0.5em 0.5em;
  }
}

/* 上に戻るボタン（共通） */
#scrollTopBtn {
  display: none; /* 初期は非表示 */
  position: fixed;
  bottom: 40px;
  right: 25px;
  z-index: 1000;
  background-color: #a3332b;
  color: #fff;
  border: none;
  border-radius: 50%;
  padding: 14px 18px;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  transition: opacity 0.3s, transform 0.3s;
}

#scrollTopBtn:hover {
  background-color: #861e1e;
  transform: scale(1.1);
}

/* スマホサイズ（指で押しやすいように大きめ＆少し上に） */
@media (max-width: 700px) {
  #scrollTopBtn {
    bottom: 60px;
    right: 20px;
    padding: 16px 20px;
    font-size: 26px;
  }
}



/* 共通スタイル */
.main-nav, .nav-menu {
  display: flex;
  flex-wrap: wrap; /* はみ出したら折り返し */
  justify-content: center;
  background-color: #a3332b;
  padding: 10px;
}

.main-nav a, .nav-menu a {
  color: #fff;
  text-decoration: none;
  margin: 0 8px;
  padding: 8px 10px;
  border-radius: 4px;
  font-size: 0.95em;
}

.main-nav a:hover, .nav-menu a:hover {
  background-color: #861e1e;
}

/* 2段目メニュー（色違いなど） */
.nav-menu {
  background-color: #444;
}

/* スマホ対応（縦並び） */
@media (max-width: 700px) {
  .main-nav, .nav-menu {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .main-nav a, .nav-menu a {
    display: block;
    margin: 4px 0;
    padding: 12px;
    font-size: 1rem;
  }
}



.supporter-img {
  width: 100%;
  height: 400px;
  object-fit: contain;  /* 縦長、横長ともに全体を表示　background-colorも必要 */
  background-color: #fff; /* 足りない部分は白で埋める */
}

/* スマホ対応（縦並び） */
@media (max-width: 700px) {
  .project-img  {
     height: auto;
  }


