/* =====================================================
   一般入試ページ固有スタイル
   読み込み条件: is_page_template( 'templates/page-general-exam.php' )
   home のセクション CSS (top.css) とセットで enqueue される前提
===================================================== */

/* -----------------------------------------------------
   対応大学/学部/入試方式一覧
----------------------------------------------------- */
.general-universities {
  background: #fff;
  overflow: hidden;
}

/* フィルタタブ（すべて / 共通テスト / 早稲田大学 ...）*/
.general-universities-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  margin-top: 40px;
  padding: 0 0 16px;
}

.general-univ-tab {
  appearance: none;
  background: transparent;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  color: #999;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s;
}

.general-univ-tab:hover {
  color: var(--color-primary);
}

.general-univ-tab.is-active {
  color: var(--color-primary);
}

.general-universities-divider {
  height: 1px;
  background: #d9d9d9;
  margin: 0 0 40px;
}

/* カード群：横スクロール（PC でも一覧が長くなる想定） */
.general-universities-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  padding-bottom: 20px;
}

.general-universities-scroll::-webkit-scrollbar {
  height: 6px;
}

.general-universities-scroll::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 3px;
}

.general-universities-list {
  display: flex;
  gap: 20px;
  padding: 20px 0 20px 20px;
}

/* flex+overflow-x の右 padding 無視バグ対策。最後にダミー要素で右余白を確保 */
.general-universities-list::after {
  content: "";
  flex: 0 0 20px;
}

.general-univ-card {
  flex: 0 0 240px;
  height: 100px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 4px;
  padding: 12px 16px;
  text-decoration: none;
  color: #333;
  transition: box-shadow 0.2s, transform 0.2s;
}

.general-univ-card:hover {
  box-shadow: 0 0 28px 0 rgba(0, 0, 0, 0.18);
  transform: translateY(-2px);
  opacity: 1;
}

/* JS による [hidden] 切替を効かせる（display: flex の上書き対策） */
.general-univ-card[hidden] {
  display: none;
}

.general-univ-univ {
  font-size: 12px;
  font-weight: 400;
  color: #333;
  line-height: 1;
}

.general-univ-title {
  font-size: 20px;
  font-weight: 700;
  color: #333;
  line-height: 1.2;
}


/* =====================================================
   RESPONSIVE - TABLET (769px ～ 1024px)
===================================================== */
@media (max-width: 1024px) {
  .general-universities-filter {
    gap: 20px;
  }

  .general-univ-tab {
    font-size: 18px;
  }
}

/* =====================================================
   RESPONSIVE - SP (≤ 768px)
===================================================== */
@media (max-width: 768px) {
  .general-universities-filter {
    gap: 16px;
    margin-top: 24px;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .general-universities-filter::-webkit-scrollbar {
    display: none;
  }

  .general-univ-tab {
    font-size: 15px;
    flex-shrink: 0;
  }

  .general-universities-divider {
    margin: 0 0 24px;
  }

  .general-universities-list {
    gap: 14px;
    padding: 12px 0 12px 12px;
  }

  .general-universities-list::after {
    flex-basis: 12px;
  }

  .general-univ-card {
    flex-basis: 200px;
    height: 90px;
    padding: 10px 12px;
    gap: 4px;
  }

  .general-univ-univ {
    font-size: 11px;
  }

  .general-univ-title {
    font-size: 17px;
  }

}

/* =====================================================
   SMALL SP (≤ 375px)
===================================================== */
@media (max-width: 375px) {
  .general-univ-tab {
    font-size: 14px;
  }

  .general-univ-card {
    flex-basis: 180px;
    height: 82px;
  }

  .general-univ-title {
    font-size: 16px;
  }
}
