:root {
  --main-bg: #fdfdfd;
  --accent: #a8dadc;
  --sub-accent: #b8e0d2;
  --text: #333;
  --soft-beige: #f5ede0;

  --accent-blue: #008080;
  --text-light: #fdfdfd;
  --text-dark: #333;
  --about-bg: #e6f3f3;

  --accent-light: #4db6ac;
  --section-light: #f8fbfb;
  --shadow: rgba(0, 0, 0, 0.08);
}

/* 基本スタイル */
body {
  font-family: "Noto Sans JP", sans-serif;
  margin: 0;
  background: var(--main-bg);
  color: var(--text-dark);
  line-height: 1.8;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ヘッダー */
header {
  background: white;
  box-shadow: 0 1px 4px var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 1rem;
}

.logo {
  margin: 0;
  font-size: 1.5rem;
  color: var(--accent-blue);
  letter-spacing: 1px;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

nav a {
  text-decoration: none;
  color: var(--text-dark);
  transition: color 0.2s;
  font-weight: 500;
}

nav a:hover {
  color: var(--accent-blue);
}

/* セクション共通 */
section {
  padding: 5rem 1rem;
  text-align: center;
}

.section-title {
  font-size: 2rem;
  margin-bottom: 3rem;
  color: var(--accent-blue);
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -10px;
  width: 60px;
  height: 3px;
  background-color: var(--accent-light);
}

/* ヒーローセクション */
.hero-section {
  background-color: var(--accent-blue);
  background-image: url('Images/coderdojo_kawanishi.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: var(--text-light);
  padding: 6rem 1rem;
  text-align: center;
}

.hero-title {
  font-size: 2.5rem;
  line-height: 1.4;
  margin-bottom: 1.5rem;
  font-weight: bold;
  color: var(--text-light);
  text-shadow:
    -1px -1px 0 var(--accent-blue),
    1px -1px 0 var(--accent-blue),
    -1px 1px 0 var(--accent-blue),
    1px 1px 0 var(--accent-blue),
    0px 0px 8px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
  font-size: 1.2rem;
  margin-bottom: 3rem;
  color: var(--text-light);
  text-shadow:
    -0.5px -0.5px 0 var(--accent-blue),
    0.5px -0.5px 0 var(--accent-blue),
    -0.5px 0.5px 0 var(--accent-blue),
    0.5px 0.5px 0 var(--accent-blue);
}

/* CTAボタン */
.cta-button {
  display: inline-block;
  background: var(--accent-light);
  color: white;
  text-decoration: none;
  padding: 0.8rem 2.5rem;
  border-radius: 50px;
  font-weight: bold;
  font-size: 1.1rem;
  transition: background 0.3s, transform 0.2s;
}

.cta-button:hover {
  background: #008080;
  transform: translateY(-2px);
}

.primary-cta {
  margin-top: 2rem;
  background: #ff5722;
}

.primary-cta:hover {
  background: #e64a19;
}

/* CoderDojo概要 */
.about-section {
  background-color: var(--about-bg);
}

.about-section h2 {
  color: var(--text-dark);
}

.about-card {
  background: white;
  padding: 0;
  border-radius: 1rem;
  box-shadow: 0 4px 10px var(--shadow);
  text-align: center;
}

.about-card h3 {
  color: var(--accent-blue);
  font-size: 1.3rem;
  margin-top: 0;
}

/* イベントカード */
.events-section {
  background: white;
}

.event-card {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 3rem auto 2rem;
  gap: 1rem;
}

.nav-btn {
  background: var(--accent-blue);
  border: none;
  color: white;
  font-size: 1.4rem;
  padding: 0.8rem 1.2rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background 0.3s, opacity 0.3s;
  box-shadow: 0 2px 4px var(--shadow);
}

.nav-btn:hover {
  background: var(--accent-light);
}

.nav-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.event-info {
  background: var(--section-light);
  padding: 1.5rem;
  border-radius: 1rem;
  box-shadow: 0 4px 10px var(--shadow);
  width: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 170px;
  justify-content: center;
}

.event-month {
  font-size: 1.8rem;
  color: var(--accent-blue);
  margin: 0.5rem 0;
}

.event-detail {
  margin: 0.5rem 0;
  font-size: 1rem;
}

#next-event-link {
  min-width: 220px;
}

/* 過去の開催履歴 */
.history-section {
  background: var(--section-light);
}

.history-lead {
  max-width: 760px;
  margin: 0 auto 2.5rem;
  font-size: 1.05rem;
}

.history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.history-entry {
  background: #f3f3f3;
  border-radius: 0.8rem;
  overflow: hidden;
  box-shadow: 0 4px 10px var(--shadow);
  text-align: left;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.history-entry.is-hidden {
  display: none;
}

.history-entry-date {
  background: #eeeeee;
  color: #7a9c35;
  font-size: 1.8rem;
  font-weight: 700;
  text-align: center;
  padding: 1rem 1rem 0.8rem;
}

.history-entry-title {
  background: #7da63a;
  color: white;
  font-size: 1.9rem;
  line-height: 1.5;
  text-align: center;
  margin: 0;
  padding: 1.2rem 1.2rem;
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.history-entry-text {
  color: var(--text-dark);
  font-size: 1rem;
  line-height: 1.9;
  padding: 1.4rem 1.5rem 0;
  margin: 0;
  flex-grow: 1;
}

.history-entry-button {
  display: inline-block;
  align-self: center;
  margin: 1.5rem 0 1.8rem;
  background: var(--accent-blue);
  color: white;
  text-decoration: none;
  font-weight: bold;
  padding: 0.75rem 1.6rem;
  border-radius: 999px;
  transition: background 0.3s, transform 0.2s;
}

.history-entry-button:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
  color: white;
}

.history-toggle-button {
  display: inline-block;
  margin-top: 2rem;
  background: white;
  color: var(--accent-blue);
  border: 2px solid var(--accent-blue);
  border-radius: 999px;
  padding: 0.85rem 2rem;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s, color 0.3s, transform 0.2s;
}

.history-toggle-button:hover {
  background: var(--accent-blue);
  color: white;
  transform: translateY(-2px);
}

/* 主催者情報 */
.organizer-section {
  background: var(--text-dark);
  color: var(--text-light);
  padding: 4rem 1rem;
}

.organizer-section .section-title {
  color: var(--accent-light);
}

.organizer-section p {
  font-size: 1.1rem;
  line-height: 2;
}

.organizer-image {
  width: 260px;
  height: 260px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  display: block;
  margin: 0 auto 1.5rem;
  box-shadow: 0 4px 10px var(--shadow);
}

/* フッター */
footer {
  background: var(--accent-blue);
  text-align: center;
  padding: 1rem;
  color: white;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    padding: 1rem;
  }

  nav ul {
    gap: 1rem;
    margin-top: 0.5rem;
    justify-content: center;
  }

  .hero-title {
    font-size: 1.8rem;
  }

  .card-group {
    flex-direction: column;
  }

  .event-card {
    flex-direction: column;
    gap: 0.5rem;
  }

  .event-info {
    width: 90%;
    max-width: 350px;
    padding: 1rem;
    min-height: 150px;
  }

  .nav-btn {
    padding: 0.6rem 1rem;
    font-size: 1.2rem;
  }

  .history-entry-date {
    font-size: 1.5rem;
  }

  .history-entry-title {
    font-size: 1.5rem;
    min-height: auto;
  }

  .organizer-image {
    width: 200px;
    height: 200px;
  }
}

.image-center-box {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}
