@charset "UTF-8";

/* ナビゲーションバーを全デバイスで非表示 (サイドバー/ブランドセクションに統合) */
.navbar.fixed-top {
    display: none !important;
}

body {
  padding-top: 0 !important;
  background-color: #f8fafc; /* より明るく清潔感のある背景 */
  color: #1d1d1f; /* 少しだけ柔らかい黒 */
  font-family: "Noto Sans JP", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- 共通ナビゲーションバーのモダン化 --- */
.navbar.bg-secondary {
    background: linear-gradient(135deg, #0077ED 0%, #00B4D8 100%) !important;
    border-bottom: none;
    box-shadow: 0 4px 20px rgba(0, 119, 237, 0.15);
    height: 70px;
    padding: 0 1rem;
    transition: background 0.5s ease;
}

/* ジャンル別ナビバー背景の上書き */
.genre-sports-club .navbar.bg-secondary { background: linear-gradient(135deg, #0077ED, #00B4D8) !important; }
.genre-sports-circle .navbar.bg-secondary { background: linear-gradient(135deg, #00B4D8, #20E2D7) !important; }
.genre-culture-club .navbar.bg-secondary { background: linear-gradient(135deg, #7209B7, #F72585) !important; }
.genre-culture-circle .navbar.bg-secondary { background: linear-gradient(135deg, #F8961E, #F9C74F) !important; }

.navbar-brand {
    color: #ffffff !important;
    font-weight: 800;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
}

.navbar-dark .navbar-toggler {
    border: none;
}

.navbar-dark .navbar-toggler:focus {
    box-shadow: none;
}

.navbar-dark .navbar-toggler {
    border: none;
}

.navbar-dark .navbar-toggler:focus {
    box-shadow: none;
}

/* --- ナビゲーションバーのデスクトップ非表示 (サイドバー統合のため) --- */
@media (min-width: 992px) {
    .navbar.fixed-top {
        display: none !important;
    }
    body {
        padding-top: 0 !important; /* デスクトップでは余白を完全に削除 */
    }
    .main-layout-container {
        margin-top: 0;
    }
}

/* ロゴのスタイル */
.Logo {
  height: 48px;
  width: 48px;
  margin-right: 12px;
  border-radius: 50%;
  background-color: transparent;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  object-fit: cover;
  padding: 0;
  transform: scale(1.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.Logo:hover {
  transform: scale(1.15) translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

/* メインコンテナ (全幅対応) */
.main-layout-container {
  display: flex;
  max-width: 100%;
  margin: 0;
  padding: 0;
  gap: 0;
  align-items: flex-start;
  flex-direction: row; /* サイドバーを左、結果を右に */
}

/* サイドバーエリア (左端固定) */
.sidebar-area {
    width: 300px;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 30px 20px 30px 30px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    z-index: 100;
    background-color: #ffffff;
    border-right: 1px solid rgba(0, 0, 0, 0.06);
    overflow-y: auto;
}

/* サイドバー統合ナビゲーションのスタイル */
.sidebar-brand-section .Logo {
    /* base style uses a good shadow */
}

.sidebar-nav-section .nav-link {
    transition: all 0.2s;
    border-radius: 8px;
    padding: 8px 12px !important;
}

.sidebar-nav-section .nav-link:hover {
    background: rgba(0, 119, 237, 0.05);
    color: #0077ED !important;
}

/* 検索ボックス本体 (サイドバーに馴染ませるためスタイル解除) */
#search-container {
    background-color: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    border: none;
    width: 100%;
}

/* メインエリア */
.result-area {
  flex-grow: 1;
  width: 100%;
  padding: 30px 40px;
}

/* セクションタイトル */
.result-area h4 {
  margin-bottom: 1.5rem;
  color: #1d1d1f;
  font-weight: 700;
  position: relative;
  display: inline-block;
}

.result-area h4::after {
    content: '';
    display: block;
    width: 100%;
    height: 4px;
    background: #0077ED; /* 鮮やかな青 */
    border-radius: 2px;
    margin-top: 6px;
    opacity: 0.2;
}

/* --- フィルタ・チップ --- */
.filter-chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    margin-bottom: 20px;
    min-height: 32px;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    background: #ffffff;
    border: 1.5px solid #edf2f7;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.filter-chip:hover {
    border-color: #0077ED;
    color: #0077ED;
    background: rgba(0, 119, 237, 0.05);
    transform: translateY(-1px);
}

/* ジャンル別チップ・ホバーカラー */
.filter-chip.chip-sports-club:hover { border-color: #0077ED; color: #0077ED; background: rgba(0, 119, 237, 0.05); }
.filter-chip.chip-sports-circle:hover { border-color: #00B4D8; color: #00B4D8; background: rgba(0, 180, 216, 0.05); }
.filter-chip.chip-culture-club:hover { border-color: #7209B7; color: #7209B7; background: rgba(114, 9, 183, 0.05); }
.filter-chip.chip-culture-circle:hover { border-color: #F8961E; color: #F8961E; background: rgba(248, 150, 30, 0.05); }

.filter-chip i {
    margin-left: 8px;
    font-size: 0.75rem;
    color: #a0aec0;
    transition: color 0.2s;
}

.filter-chip:hover i {
    color: #0077ED;
}

/* --- 検索結果0件時のスタイル --- */
.no-results-container {
    grid-column: 1 / -1; /* グリッド全体を占有 */
    text-align: center;
    padding: 60px 20px;
    background: #ffffff;
    border-radius: 24px;
    border: 1px solid rgba(0,0,0,0.05);
    margin-top: 20px;
}

.no-results-icon {
    width: 80px;
    height: 80px;
    background: #f8fafc;
    color: #cbd5e0;
    font-size: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 0 auto 20px;
}

.no-results-container h5 {
    font-weight: 800;
    color: #1d1d1f;
    margin-bottom: 10px;
}

.no-results-container p {
    color: #636e72;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

/* 共通ボタン */
.btn-primary-modern {
    background: linear-gradient(135deg, #0077ED 0%, #00B4D8 100%);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(0, 119, 237, 0.2);
}

.btn-primary-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 119, 237, 0.3);
    color: white;
}

/* --- スクロールアニメーション (Scroll Reveal) --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
    will-change: opacity, transform;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* 遅延用の設定 (順番にふわっと出したい時用) */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* --- 検索サイドバー --- */
.search-section {
  margin-bottom: 1.5rem;
}

.search-section h5 {
  font-size: 0.95rem;
  color: #555;
  margin-bottom: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-section h5 i {
    color: #0077b6;
}

/* 入力フォーム */
.form-control {
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    padding: 10px 12px;
    background-color: #f9f9f9;
    transition: all 0.3s ease;
}
.form-control:focus {
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(0, 119, 182, 0.1);
    border-color: #0077b6;
}

/* トグルボタン */
.toggle-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #fff;
  color: #444;
  padding: 12px 15px;
  border-radius: 8px;
  cursor: pointer;
  margin-bottom: 5px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s;
  border: 1px solid #f0f0f0;
}

.toggle-btn:hover {
  background-color: #f0f8ff;
  color: #0077b6;
  border-color: #cce5ff;
}

/* フィルタグループ */
.filter-group {
  display: none;
  flex-direction: column;
  padding: 10px 15px;
  background-color: #fff;
  border-radius: 0 0 8px 8px;
  margin-bottom: 10px;
}

.filter-group.active {
    display: flex !important;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.filter-group label {
  margin-bottom: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  color: #666;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

.filter-group label:hover {
    color: #0077b6;
}

.filter-group input[type="checkbox"] {
  margin-right: 10px;
  accent-color: #0077b6;
  transform: scale(1.1);
}

/* リセットボタン */
#reset-btn {
    border-radius: 8px;
    padding: 10px;
    font-weight: 600;
    margin-top: 10px;
}

/* --- カード検索結果 --- */
.club-card-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 30px;
}

/* カード本体 */
.club-card {
  background-color: #ffffff;
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 4px 12px rgba(0,0,0,0.02);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: none; /* 浮き上がりアニメーションを無効化 */
  position: relative;
}

.club-card:hover {
  /* ホバー時の浮き上がりアクションを削除 */
}

/* 団体名の下線アクセント */
.club-name {
  font-size: clamp(1rem, 5vw, 1.15rem); /* 流動的なフォントサイズ */
  font-weight: 700;
  margin-bottom: 0.6rem;
  color: #1d1d1f;
  line-height: 1.4;
  position: relative;
  display: inline-block;
  padding-bottom: 4px;
}

.club-name::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%; /* 名前全体に広げる */
    height: 3px;
    border-radius: 2px;
}

/* 体育会系部活: ブルー */
.genre-sports-club .club-name::after { background: linear-gradient(90deg, #0077ED, #00B4D8); }

/* 体育会系サークル: アクア/グリーン */
.genre-sports-circle .club-name::after { background: linear-gradient(90deg, #00B4D8, #20E2D7); }

/* 文化総部: パープル/ピンク */
.genre-culture-club .club-name::after { background: linear-gradient(90deg, #7209B7, #F72585); }

/* 文化系サークル: オレンジ/イエロー */
.genre-culture-circle .club-name::after { background: linear-gradient(90deg, #F8961E, #F9C74F); }

.club-img {
  width: 100%;
  aspect-ratio: 3 / 2; /* デスクトップは 3:2 の比率に固定 */
  object-fit: cover;
  background-color: #f1f3f5;
  transition: none;
}

.club-card:hover .club-img {
    /* ホバー時の拡大アクションを削除 */
}

.club-card-body {
  padding: 1.25rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  background: #fff;
}

.club-name {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  color: #1d1d1f;
  line-height: 1.4;
}

.club-genle {
    font-size: 0.7rem;
    color: #0077ED;
    font-weight: 700;
    margin-bottom: 1rem;
    display: inline-block;
    background: rgba(0, 119, 237, 0.05);
    padding: 4px 10px;
    border-radius: 6px;
}

.club-population,
.club-frequency {
  font-size: 0.85rem;
  color: #636e72;
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* アイコン装飾 */
.club-population::before {
    content: '\f0c0'; /* users */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    color: #a0aec0;
    width: 16px;
    text-align: center;
}
.club-frequency::before {
    content: '\f017'; /* clock */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    color: #a0aec0;
    width: 16px;
    text-align: center;
}

/* タグコンテナ */
.tag-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0;
}

/* SNSリンク */
.social-links {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: auto; 
  padding-top: 16px;
  border-top: 1px solid #f1f3f5;
}

.club-link {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #f8f9fa;
  color: #495057;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  font-size: 1rem;
}

.club-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    color: #fff;
}

.instagram-link:hover { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%); }
.x-link:hover { background: #000; }
.website-link:hover { background: #0d6efd; }

/* アイコンの微調整（ウェブサイトアイコンが少し小さく見えるのを修正） */
.club-link i {
    transition: transform 0.2s;
}

.club-link:hover i {
    transform: scale(1.1);
}

/* --- タグのスタイル (パステル調) --- */
.tag {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 700;
}
.tag-official { background-color: #ebfbee; color: #2b8a3e; }
.tag-warn { background-color: #fff9db; color: #e67700; }
.tag-ok { background-color: #e7f5ff; color: #1c7ed6; }
.tag-rec { background-color: #fff5f5; color: #e03131; }
.tag-keyword { background-color: #f8f9fa; color: #495057; border: 1px solid #e9ecef; }

/* === 比較用フローティングバー（Glassmorphism） === */
.compare-bar {
    position: fixed;
    bottom: -150px;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    max-width: 900px;
    background: rgba(29, 29, 31, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 16px 24px;
    border-radius: 16px 16px 0 0;
    z-index: 1050;
    transition: bottom 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 -10px 40px rgba(0,0,0,0.2);
    border-top: 1px solid rgba(255,255,255,0.1);
}

.compare-bar.show {
    bottom: 0;
}

.compare-items {
    overflow-x: auto;
    padding-bottom: 5px;
}
.compare-items::-webkit-scrollbar { display: none; }

.compare-mini-card {
    width: 80px;
    background: rgba(255,255,255,0.95);
    border-radius: 8px;
    overflow: hidden;
    font-size: 0.6rem;
    text-align: center;
    flex-shrink: 0;
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.compare-mini-card img {
    width: 100%;
    height: 45px;
    object-fit: cover;
}

.compare-mini-card span {
    display: block;
    padding: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
    color: #1d1d1f;
}

.compare-mini-card .btn-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(0,0,0,0.5);
    color: white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    font-size: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
}

/* 矢印回転 */
.toggle-btn i { transition: transform 0.3s ease; }
.toggle-btn i.rotate { transform: rotate(180deg); }


/* === スマホ用フローティングボタン (FAB) === */
.mobile-search-fab {
    position: fixed;
    bottom: 100px; /* 比較バーの上に配置 */
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0077ED 0%, #00B4D8 100%);
    color: white;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1040;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
    transform: scale(0) translateY(20px);
    pointer-events: none;
}

.mobile-search-fab.show {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: auto;
}

.mobile-search-fab i {
    font-size: 1.2rem;
    margin-bottom: 2px;
}

.fab-label {
    font-size: 0.6rem;
    font-weight: 800;
}

.mobile-search-fab:active {
    transform: scale(0.9);
}

/* 比較バーが表示されている時の位置調整 */
.compare-bar.show ~ .mobile-search-fab {
    bottom: 140px; /* 比較バーの高さ分上げる */
}

/* オフキャンバス内のスタイル調整 */
.mobile-filter-offcanvas {
    width: 85% !important;
    max-width: 320px;
    z-index: 2000 !important; /* 比較バー(1050)より上に表示 */
}

.mobile-filter-offcanvas .sidebar-area {
    width: 100% !important;
    height: auto !important;
    padding: 10px !important; /* パディングを調整 */
    border: none !important;
    position: static !important;
    overflow: visible !important;
}

.mobile-filter-offcanvas .sidebar-brand-section {
    display: block !important; /* モバイルメニュー内でも表示・クリック可能にする */
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

/* === レスポンシブ (スマホ・タブレット) === */
@media (max-width: 991px) {
  .main-layout-container {
    flex-direction: column;
    padding: 0;
    gap: 0;
  }

  .result-area {
    padding: 20px 12px; /* スマホでは余白を詰め、カードの表示領域を広げる */
  }

  .sidebar-area {
    display: none; /* スマホではトップの検索エリアを非表示に */
  }

  /* オフキャンバス内のサイドバーは表示する */
  .mobile-filter-offcanvas .sidebar-area {
      display: flex !important;
      width: 100% !important;
      height: auto !important;
      padding: 10px !important;
      border: none !important;
      position: static !important;
      overflow: visible !important;
  }

  .club-card-container {
      grid-template-columns: 1fr; /* 1列に固定 */
      gap: 20px;
  }

  .club-card {
    flex-direction: column; 
    height: auto;
    align-items: stretch;
    border: 1.5px solid rgba(0,0,0,0.06);
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
  }

  .compare-bar {
    width: 100%;
    max-width: none;
    padding: 15px 12px;
    border-radius: 20px 20px 0 0;
    background: rgba(29, 29, 31, 0.95); /* 不透明度を上げて視認性向上 */
  }

  .compare-bar .container {
      flex-direction: row !important; /* 横並びを維持 */
      padding: 0;
      gap: 10px;
  }

  .compare-items {
    flex-grow: 1;
    display: flex;
    justify-content: flex-start;
    padding-bottom: 0;
    gap: 8px !important;
  }

  .compare-mini-card {
    width: 60px;
    font-size: 0.5rem;
    border: 1px solid rgba(255,255,255,0.1);
  }

  .compare-mini-card img {
    height: 32px;
  }

  .compare-action {
      flex-shrink: 0;
      width: auto !important;
  }

  .compare-action p {
      font-size: 0.65rem !important;
      margin-bottom: 4px !important;
  }

  .compare-action .btn {
      padding: 8px 12px !important;
      font-size: 0.75rem !important;
      border-radius: 10px !important;
  }
  
  .club-img {
      width: 100%; /* 横幅いっぱい */
      aspect-ratio: 16 / 9; /* スマホでは 16:9 でスッキリ見せる */
      object-fit: cover;
      display: block;
      flex-shrink: 0;
  }
  
  .club-card-body {
      padding: 16px;
      min-width: 0;
  }
  
  .club-name {
      font-size: 1.1rem;
      margin-bottom: 0.4rem;
      padding-bottom: 4px;
  }
  
  .club-genle {
      font-size: 0.65rem;
      margin-bottom: 0.6rem;
      padding: 3px 8px;
  }
  
  .club-population,
  .club-frequency {
      font-size: 0.8rem;
      margin-bottom: 2px;
  }

  .tag-container {
      margin: 10px 0;
      gap: 6px;
  }

  .tag {
      font-size: 0.65rem;
      padding: 3px 8px;
  }

  .social-links {
      padding-top: 12px;
      gap: 12px;
  }

  .club-link {
      width: 32px;
      height: 32px;
      font-size: 0.95rem;
  }

  /* スマホでは常にホバー時の色を適用 */
  .instagram-link { 
      background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%) !important;
      color: #fff !important;
  }
  .x-link { background: #000 !important; color: #fff !important; }
  .website-link { background: #0d6efd !important; color: #fff !important; }
}