/* RaTs Japan - 新スタイルシート（既存CSS非使用） */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --color-primary: #105848;
  --color-accent: #ff9900;
  --color-text: #333;
  --color-text-muted: #666;
  --color-bg-light: #fafafa;
  --max-width: 1200px;
  --header-height: 80px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  color: var(--color-text);
  line-height: 1.7;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

/* ヘッダー */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  flex-wrap: wrap;
}

.site-logo {
  height: 60px;
}

.site-logo img {
  height: 100%;
  width: auto;
}

/* ナビゲーション */
.main-nav ul {
  display: flex;
  gap: 8px;
  align-items: center;
}

.main-nav a {
  display: block;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.main-nav a:hover {
  color: var(--color-primary);
}

.main-nav .submenu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  min-width: 200px;
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.main-nav .has-submenu:hover .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.main-nav .has-submenu {
  position: relative;
}

.main-nav .submenu a {
  padding: 10px 20px;
  font-size: 14px;
}

/* モバイルメニュー（チェックボックスは常に非表示） */
.menu-checkbox {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  font-size: 24px;
}

/* メインコンテンツ */
main {
  padding-top: var(--header-height);
}

/* ヒーロースライダー - CSSのみで実装 */
.hero {
  position: relative;
  height: 70vh;
  min-height: 400px;
  overflow: hidden;
}

.hero-slides {
  position: relative;
  width: 100%;
  height: 100%;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  animation: slideShow 16s infinite;
}

.hero-slide:nth-child(1) { animation-delay: 0s; }
.hero-slide:nth-child(2) { animation-delay: 4s; }
.hero-slide:nth-child(3) { animation-delay: 8s; }
.hero-slide:nth-child(4) { animation-delay: 12s; }

@keyframes slideShow {
  0%, 22% { opacity: 1; }
  25%, 97% { opacity: 0; }
  100% { opacity: 1; }
}

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

.hero-caption {
  position: absolute;
  bottom: 20%;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  text-shadow: 1px 1px 4px rgba(0,0,0,0.6);
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 700;
  text-align: center;
}

.hero-dots {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
}

.hero-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  animation: dotPulse 16s infinite;
}

.hero-dots span:nth-child(1) { animation-delay: 0s; }
.hero-dots span:nth-child(2) { animation-delay: 4s; }
.hero-dots span:nth-child(3) { animation-delay: 8s; }
.hero-dots span:nth-child(4) { animation-delay: 12s; }

@keyframes dotPulse {
  0%, 22% { background: #fff; transform: scale(1.2); }
  25%, 97% { background: rgba(255,255,255,0.5); transform: scale(1); }
  100% { background: #fff; transform: scale(1.2); }
}

/* セクション共通 */
.section {
  padding: 80px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-title {
  text-align: center;
  margin-bottom: 48px;
}

.section-title h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 8px;
}

.section-title .tagline {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

/* 統計セクション */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  text-align: center;
  padding: 60px 24px;
  background: #fff;
}

.stat-item {
  padding: 24px 16px;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 8px;
}

.stat-label {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
}

.stat-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
}

.stat-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* RaTsとは何か */
.about-section {
  background: var(--color-bg-light);
}

.about-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.about-card {
  text-align: center;
}

.about-card img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  margin-bottom: 20px;
  border-radius: 4px;
}

.about-card h3 {
  font-size: 1.125rem;
  margin-bottom: 12px;
  color: var(--color-primary);
}

.about-card p {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
}

/* RaTs Japanに向けて */
.teachers-section {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 60px;
  align-items: start;
}

.teacher-card {
  text-align: center;
}

.teacher-card img {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 50%;
  margin: 0 auto 20px;
}

.teacher-card h3 {
  font-size: 1.25rem;
  margin-bottom: 8px;
}

.teacher-card .title {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: 12px;
}

.teacher-card .quote {
  font-size: 0.875rem;
  color: #808080;
  font-style: italic;
}

/* バナーセクション */
.banners {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  padding: 80px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.banner {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  min-height: 280px;
  display: block;
}

.banner-image {
  position: absolute;
  inset: 0;
}

.banner-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.4;
}

.banner-content {
  position: relative;
  padding: 40px 32px;
  color: #fff;
  height: 100%;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.banner-fellowship .banner-content { background: var(--color-primary); }
.banner-workshop .banner-content { background: var(--color-accent); }

.banner h3 {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.banner p {
  font-size: 0.9375rem;
  margin-bottom: 24px;
  opacity: 0.95;
}

.banner .btn {
  display: inline-block;
  padding: 12px 24px;
  background: #fff;
  color: var(--color-text);
  font-weight: 600;
  border-radius: 4px;
  transition: opacity 0.2s;
  align-self: flex-start;
}

.banner .btn:hover {
  opacity: 0.9;
}

/* トップへ戻る */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  background: var(--color-primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  z-index: 100;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.back-to-top:hover {
  opacity: 1;
}

/* フッター */
.site-footer {
  background: #2d2d2d;
  color: #fff;
  padding: 60px 24px 24px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 2fr;
  gap: 48px;
  margin-bottom: 40px;
}

.footer-logo {
  width: 120px;
  margin-bottom: 16px;
}

.footer-brand {
  font-size: 0.875rem;
  line-height: 1.6;
}

.footer-nav h4,
.footer-contact h5 {
  font-size: 0.875rem;
  margin-bottom: 16px;
  color: rgba(255,255,255,0.9);
}

.footer-nav ul li {
  margin-bottom: 8px;
}

.footer-nav a {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.8);
}

.footer-nav a:hover {
  color: #fff;
}

.footer-nav .sub-menu {
  margin-left: 16px;
  margin-top: 4px;
}

.footer-contact p,
.footer-contact a {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.8);
  margin-bottom: 8px;
  display: block;
}

.footer-contact a:hover {
  color: #fff;
}

.footer-bottom {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.2);
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.6);
}

/* レスポンシブ */
@media (max-width: 900px) {
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-cards {
    grid-template-columns: 1fr;
  }

  .teachers-section {
    grid-template-columns: 1fr;
  }

  .banners {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    padding: 24px;
  }

  .menu-checkbox:checked ~ .main-nav {
    display: block;
  }

  .menu-toggle {
    display: block;
  }

  .main-nav ul {
    flex-direction: column;
    align-items: stretch;
  }

  .main-nav .submenu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    padding-left: 16px;
    margin-top: 8px;
  }

  .stats {
    grid-template-columns: 1fr;
  }
}

/* ===== サブページ共通 ===== */
.page-hero {
  height: 280px;
  background: #318574;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-align: center;
  padding: 24px;
}

.page-hero h1 {
  font-size: 2rem;
  margin-bottom: 8px;
}

.page-hero p {
  font-size: 0.9375rem;
  opacity: 0.9;
}

.page-content {
  padding: 80px 24px 100px;
  max-width: var(--max-width);
  margin: 0 auto;
}

/* ページ内セクション */
.content-section {
  margin-bottom: 60px;
}

.content-section h2 {
  font-size: 1.5rem;
  color: var(--color-primary);
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--color-primary);
}

/* タブ風ナビ（CSS :target） */
.tabs-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}

.tabs-nav a {
  padding: 10px 20px;
  background: #e8e8e8;
  border-radius: 4px;
  font-size: 0.9375rem;
}

.tabs-nav a:hover {
  background: #ddd;
}

/* チェックリスト */
.check-list {
  margin: 24px 0;
}

.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.check-list li::before {
  content: "✓";
  color: var(--color-accent);
  font-weight: bold;
  flex-shrink: 0;
}

/* カードグリッド */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 32px;
}

.card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* FAQ */
.faq-section h2 {
  background: #318574;
  color: #fff;
  padding: 16px 24px;
  border-radius: 8px;
  margin: 40px 0 24px;
}

.faq-section h2:first-child {
  margin-top: 0;
}

.faq-item {
  background: #fff;
  padding: 20px 24px;
  margin-bottom: 16px;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.faq-item h3 {
  font-size: 1rem;
  margin-bottom: 12px;
  color: var(--color-text);
}

.faq-item p {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
}

/* CTAボタン */
.cta-button {
  display: inline-block;
  padding: 16px 32px;
  background: var(--color-primary);
  color: #fff;
  font-weight: 600;
  border-radius: 4px;
  margin-top: 16px;
  transition: background 0.2s;
}

.cta-button:hover {
  background: #0d4639;
}

.cta-button.accent {
  background: var(--color-accent);
}

.cta-button.accent:hover {
  background: #e68a00;
}

/* 講師グリッド */
.teacher-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.teacher-grid.supporter {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.teacher-item {
  text-align: center;
}

.teacher-item.horizontal {
  text-align: left;
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 20px;
  align-items: start;
}

.teacher-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
}

.teacher-item.horizontal img {
  width: 120px;
  height: 120px;
}

.teacher-item h3 {
  font-size: 1.125rem;
  margin: 12px 0 4px;
}

.teacher-item p {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.teacher-item .quote {
  font-size: 0.8125rem;
  color: #808080;
  font-style: italic;
  margin-top: 8px;
}

@media (max-width: 768px) {
  .teacher-grid {
    grid-template-columns: 1fr;
  }

  .teacher-item.horizontal {
    grid-template-columns: 80px 1fr;
  }

  .teacher-item.horizontal img {
    width: 80px;
    height: 80px;
  }
}

@media (max-width: 600px) {
  .program-grid {
    grid-template-columns: 1fr !important;
  }
}
