/* 屋代高校天文班 公式サイト スタイルシート */

/* CSS変数定義 */
:root {
  --bg: #010d1a;
  --card: #0d1b2e;
  --card-alt: #14233b;
  --accent: #ffd966;
  --text: #ffffff;
  --text-muted: #a0a8b0;
  --shadow: rgba(255, 255, 255, 0.08);
}

/* リセットCSS */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 基本スタイル */
body {
  font-family: hiragino-kaku-gothic-pron, sans-serif;
  font-weight: 300;
  font-style: normal;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* 星空キャンバス */
#starfield {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

/* ヘッダー */
header {
  background: rgba(1, 13, 26, 0.95);
  backdrop-filter: blur(10px);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--accent);
  text-decoration: none;
}

/* ハンバーガーメニュー（モバイル） */
.menu-toggle {
  display: block;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
}

.nav-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 250px;
  height: 100vh;
  background: var(--card);
  transition: right 0.3s ease;
  padding: 4rem 1rem 1rem;
  z-index: 999;
}

.nav-menu.active {
  right: 0;
}

.nav-menu ul {
  list-style: none;
}

.nav-menu li {
  margin-bottom: 1rem;
}

.nav-menu a {
  color: var(--text);
  text-decoration: none;
  display: block;
  padding: 0.5rem;
  border-radius: 4px;
  transition: background-color 0.3s;
}

.nav-menu a:hover,
.nav-menu a.active {
  background-color: var(--accent);
  color: var(--bg);
}

/* メインコンテンツ */
main {
  margin-top: 70px;
  min-height: calc(100vh - 70px);
}

.astronomyclubcover {
  text-align: center;
  margin-bottom: 2rem;
}

.astronomyclubcover img {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 16px var(--shadow);
}

/* セクション */
section {
  padding: 2rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* ヒーローセクション */
.hero {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: linear-gradient(rgba(1, 13, 26, 0.7), rgba(1, 13, 26, 0.7)),
    url("../images/hero-bg.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.hero-logo {
  max-width: 300px;
  width: 80%;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--accent);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.hero p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

/* カード */
.card {
  background: var(--card);
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 0 8px var(--shadow);
  margin-bottom: 1rem;
  transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px var(--shadow);
}

.card h2 {
  color: var(--accent);
  margin-bottom: 0.5rem;
}

/* グリッド */
.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

/* ボタン */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  text-decoration: none;
  text-align: center;
  transition: all 0.3s;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.btn.primary {
  background: var(--accent);
  color: var(--bg);
  font-weight: bold;
}

.btn.primary:hover {
  background: #ffed85;
  transform: translateY(-1px);
}

.btn.secondary {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}

.btn.secondary:hover {
  background: var(--accent);
  color: var(--bg);
}

/* ニュース */
.news-list {
  list-style: none;
}

.news-list li {
  background: var(--card);
  padding: 1rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
  border-left: 3px solid var(--accent);
}

.news-list time {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.news-list strong {
  color: var(--accent);
  display: block;
  margin: 0.5rem 0;
}

/* テーブル */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  background: var(--card);
  border-radius: 8px;
  overflow: hidden;
}

table th,
table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--card-alt);
}

table th {
  background: var(--card-alt);
  color: var(--accent);
  font-weight: bold;
}

/* 年間スケジュール（横スクロール） */
.schedule-container {
  overflow-x: auto;
  margin: 1rem 0;
}

.schedule-grid {
  display: grid;
  grid-template-columns: repeat(12, 150px);
  gap: 0.5rem;
  min-width: 800px;
}

.schedule-month {
  background: var(--card);
  padding: 1rem;
  border-radius: 4px;
  text-align: center;
}

.schedule-month h4 {
  color: var(--accent);
  margin-bottom: 0.5rem;
}

/* ギャラリー（Masonry風） */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-auto-rows: 200px;
  gap: 1rem;
  margin: 2rem 0;
}

.gallery figure {
  background: var(--card);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  color: var(--text);
  padding: 1rem;
  font-size: 0.9rem;
}

/* Google Maps */
.map-container {
  margin: 2rem 0;
  border-radius: 8px;
  overflow: hidden;
}

.map-container iframe {
  width: 100%;
  height: 300px;
  border: none;
}

/* プログラム（definition list） */
.program {
  background: var(--card);
  padding: 1.5rem;
  border-radius: 8px;
  margin: 1rem 0;
}

.program dt {
  color: var(--accent);
  font-weight: bold;
  margin-top: 1rem;
}

.program dt:first-child {
  margin-top: 0;
}

.program dd {
  margin-left: 1rem;
  margin-bottom: 0.5rem;
}

/* フッター */
footer {
  background: var(--card);
  padding: 2rem 1rem;
  text-align: center;
  margin-top: 3rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
}

.social-links {
  margin: 1rem 0;
}

.social-links a {
  color: var(--text);
  font-size: 1.5rem;
  margin: 0 0.5rem;
  text-decoration: none;
  transition: color 0.3s;
}

.social-links a:hover {
  color: var(--accent);
}

.event_main_visual {
  width: 80%;
}

/* ユーティリティ */
.text-center {
  text-align: center;
}
.text-accent {
  color: var(--accent);
}
.mb-1 {
  margin-bottom: 1rem;
}
.mb-2 {
  margin-bottom: 2rem;
}
.mt-1 {
  margin-top: 1rem;
}
.mt-2 {
  margin-top: 2rem;
}

/* レスポンシブ（PC） */
@media (min-width: 768px) {
  /* ヘッダー：横並びナビ */
  .menu-toggle {
    display: none;
  }

  .nav-menu {
    position: static;
    width: auto;
    height: auto;
    background: none;
    padding: 0;
    right: 0;
  }

  .nav-menu ul {
    display: flex;
  }

  .nav-menu li {
    margin: 0 0 0 1rem;
  }

  /* グリッド（2×2） */
  .grid-2x2 {
    grid-template-columns: repeat(2, 1fr);
  }

  /* ギャラリー */
  .gallery {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }

  /* セクション */
  section {
    padding: 3rem 2rem;
  }

  /* ヒーロー */
  .hero h1 {
    font-size: 3.5rem;
  }

  .hero-logo {
    max-width: 400px;
  }
}

@media (min-width: 1200px) {
  .grid-2x2 {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  .gallery {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  }
}

/* アニメーション */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeInUp 0.6s ease-out;
}

/* アクセシビリティ */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
