/* ========================================
   CSS変数
======================================== */
:root {
  --butter-yellow: #F5E6A8;
  --mustard: #D4A017;
  --dark-mustard: #B8900F;
  --cream: #FFF9E6;
  --charcoal: #2C2C2C;
  --gray-dark: #4A4A4A;
  --gray-medium: #7A7A7A;
  --gray-light: #E5E5E5;
  --white: #FFFFFF;
  --shadow-sm: 0 1px 3px rgba(212, 160, 23, 0.12);
  --shadow-md: 0 2px 8px rgba(212, 160, 23, 0.15);
  --transition: 0.2s ease;
}

/* ========================================
   リセット & ベース
======================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Noto Sans JP', 'Hiragino Sans', 'Yu Gothic', sans-serif;
  line-height: 1.6;
  color: var(--charcoal);
  background-color: var(--cream);
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--mustard);
}

/* ========================================
   コンテナ
======================================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ========================================
   ヘッダー
======================================== */
.site-header {
  background: linear-gradient(135deg, var(--butter-yellow), var(--mustard));
  padding: 0.75rem 0;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 1000;
}

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

.site-logo a {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--charcoal);
}

.main-nav {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

.nav-list {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  list-style: none;
}

.nav-list li {
  list-style: none;
}

.nav-list li::before {
  content: none;
}

.nav-link {
  padding: 0.4rem 0.75rem;
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--charcoal);
  border-radius: 6px;
  transition: all var(--transition);
  white-space: nowrap;
  display: block;
}

.nav-link:hover,
.nav-link.active {
  background-color: var(--white);
  color: var(--mustard);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background-color: var(--charcoal);
  border-radius: 2px;
  transition: all var(--transition);
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* ========================================
   ヒーロー
======================================== */
.hero {
  position: relative;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-image: url('_src/hero-yacht.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

/* 背景画像がない場合のフォールバック */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--butter-yellow), var(--mustard));
  z-index: -1;
}

/* 画像を少し暗くするオーバーレイ（薄め） */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.2) 0%,
    rgba(0, 0, 0, 0.35) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.5rem;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  color: var(--white);
  margin-bottom: 0.5rem;
  text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.7);
}

.hero-date {
  font-size: 1.125rem;
  color: var(--white);
  font-weight: 600;
  margin-bottom: 1.5rem;
  text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.7);
}

/* ヒーローCTAボタン */
.btn-primary {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: linear-gradient(135deg, var(--mustard), var(--dark-mustard));
  color: var(--white);
  border-radius: 50px;
  font-weight: 700;
  font-size: 1.25rem;
  box-shadow: 0 4px 12px rgba(212, 160, 23, 0.3);
  transition: all var(--transition);
  border: 3px solid var(--white);
}

.btn-primary:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 8px 20px rgba(212, 160, 23, 0.4);
  color: var(--white);
}

/* ========================================
   セクション共通
======================================== */
.section {
  padding: 3rem 0;
  border-bottom: 1px solid var(--gray-light);
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--charcoal);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 3px solid var(--butter-yellow);
}

.subsection-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--charcoal);
  margin: 2rem 0 1rem;
  text-align: center;
}

/* ========================================
   最新情報
======================================== */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.news-item {
  background: var(--white);
  padding: 1rem;
  border-radius: 8px;
  border-left: 3px solid var(--butter-yellow);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all var(--transition);
}

.news-item:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

.news-item.featured {
  border-left-width: 4px;
  border-left-color: var(--mustard);
  background: linear-gradient(135deg, var(--cream), var(--white));
}

.news-item time {
  font-size: 0.875rem;
  color: var(--gray-medium);
  font-weight: 500;
  min-width: 80px;
}

.news-item p {
  flex: 1;
  font-size: 0.9375rem;
}

.badge {
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  flex-shrink: 0;
}

.badge.important {
  background-color: #FF6B6B;
  color: var(--white);
}

/* ========================================
   公式書類
======================================== */
.doc-list {
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.doc-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--gray-light);
  transition: background var(--transition);
}

.doc-row:last-child {
  border-bottom: none;
}

.doc-row:hover:not(.header-row) {
  background: var(--cream);
}

.doc-row.header-row {
  background: linear-gradient(135deg, var(--butter-yellow), var(--mustard));
  font-weight: 700;
  text-align: center;
}

.doc-row.header-row .doc-col,
.doc-row.header-row .doc-col-right {
  padding: 1rem;
}

.doc-col,
.doc-col-right {
  padding: 1rem;
}

.doc-col {
  border-right: 1px solid var(--gray-light);
}

.doc-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--charcoal);
  font-size: 0.9375rem;
  transition: color var(--transition);
}

.doc-link:hover {
  color: var(--mustard);
}

.doc-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

/* エントリーフォームボタン */
.entry-form-box {
  margin-top: 2rem;
  text-align: center;
}

.btn-entry {
  display: inline-block;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, var(--mustard), var(--dark-mustard));
  color: var(--white);
  border-radius: 50px;
  font-weight: 600;
  font-size: 1.125rem;
  box-shadow: var(--shadow-md);
  transition: all var(--transition);
}

.btn-entry:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(212, 160, 23, 0.3);
  color: var(--white);
}

/* ========================================
   PDF埋め込み
======================================== */
.pdf-embed-container {
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  padding: 1rem;
  margin-bottom: 2rem;
}

.pdf-embed-container embed {
  width: 100%;
  border: none;
  border-radius: 8px;
}

.pdf-fallback {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--gray-medium);
}

.pdf-fallback a {
  color: var(--mustard);
  font-weight: 600;
}

/* 過去の成績 */
.past-results {
  background: var(--white);
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.past-results h4 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--charcoal);
}

.result-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.result-links a {
  padding: 0.5rem 1rem;
  background: var(--cream);
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition);
}

.result-links a:hover {
  background: var(--butter-yellow);
}

/* ========================================
   写真・動画
======================================== */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.media-card {
  background: var(--white);
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: all var(--transition);
  border: 2px solid transparent;
}

.media-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--butter-yellow);
}

.media-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 0.75rem;
}

.media-card h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--charcoal);
}

.media-card p {
  font-size: 0.875rem;
  color: var(--gray-medium);
}

/* ========================================
   お問い合わせ
======================================== */
.contact-box {
  background: var(--white);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.contact-label {
  font-size: 1rem;
  color: var(--gray-dark);
  margin-bottom: 1rem;
}

.email-link {
  display: inline-block;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--mustard);
  padding: 0.75rem 1.5rem;
  background: var(--cream);
  border-radius: 8px;
  transition: all var(--transition);
}

.email-link:hover {
  background: var(--butter-yellow);
  transform: scale(1.05);
}

/* ========================================
   主催団体
======================================== */
.organizers-section {
  padding: 3rem 0;
}

.organizers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  align-items: center;
  justify-items: center;
}

.organizers-grid img {
  max-width: 250px;
  transition: transform var(--transition);
}

.organizers-grid a:hover img {
  transform: scale(1.05);
}

/* ========================================
   フッター
======================================== */
.site-footer {
  background: linear-gradient(135deg, var(--charcoal), var(--gray-dark));
  color: var(--white);
  padding: 2rem 0;
  margin-top: 3rem;
}

.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-footer p {
  font-size: 0.875rem;
}

.back-to-top {
  padding: 0.5rem 1rem;
  background: var(--mustard);
  color: var(--white);
  border-radius: 6px;
  font-weight: 600;
  transition: all var(--transition);
}

.back-to-top:hover {
  background: var(--butter-yellow);
  color: var(--charcoal);
  transform: translateY(-2px);
}

/* ========================================
   レスポンシブ
======================================== */
@media screen and (max-width: 900px) {
  .nav-link {
    padding: 0.4rem 0.6rem;
    font-size: 0.8125rem;
  }

  .doc-row {
    grid-template-columns: 1fr;
  }

  .doc-col {
    border-right: none;
    border-bottom: 1px solid var(--gray-light);
  }

  .doc-col-right {
    border-top: 1px solid var(--gray-light);
  }

  .doc-row:not(.header-row) .doc-col:last-child {
    border-bottom: none;
  }
}

@media screen and (max-width: 768px) {
  .media-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
  
  .organizers-grid {
    grid-template-columns: 1fr;
  }

  .pdf-embed-container embed {
    height: 500px;
  }
}

@media screen and (max-width: 641px) {
  .site-header .container {
    flex-wrap: wrap;
  }

  .nav-toggle {
    display: flex;
  }

  .main-nav {
    width: 100%;
    order: 3;
  }

  .nav-list {
    display: none;
    flex-direction: column;
    width: 100%;
    background: var(--white);
    border-radius: 8px;
    padding: 0.5rem;
    margin-top: 0.75rem;
    gap: 0.25rem;
    box-shadow: var(--shadow-md);
    max-height: 80vh;
    overflow-y: auto;
  }

  .nav-list.active {
    display: flex;
  }

  .nav-link {
    width: 100%;
    padding: 0.875rem 1rem;
    text-align: center;
    border-radius: 6px;
    white-space: normal;
    line-height: 1.4;
  }

  .hero {
    min-height: 400px;
  }

  .section {
    padding: 2rem 0;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .news-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .news-item time {
    min-width: auto;
  }

  .email-link {
    font-size: 1.125rem;
  }

  .site-footer .container {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .result-links {
    flex-direction: column;
  }
}

@media screen and (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .hero {
    min-height: 350px;
  }

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

  .btn-entry {
    font-size: 1rem;
    padding: 0.875rem 1.5rem;
  }
}

/* ========================================
   アクセシビリティ
======================================== */
*:focus-visible {
  outline: 2px solid var(--mustard);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}