/* ======================
   全国中学生ボルダー競技大会
   ====================== */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700;900&family=Montserrat:wght@700;800;900&display=swap');

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; }

:root {
  --navy:      #0d2040;
  --navy-mid:  #1a3260;
  --red:       #c8321a;
  --white:     #ffffff;
  --gray-bg:   #f5f5f5;
  --gray-line: #e0e0e0;
  --gray-text: #666666;
  --text:      #1a1a1a;
  --max-w:     1400px;
}

html, body {
  margin: 0;
  overflow-x: hidden;
  max-width: 100%;
  font-family: "Noto Sans JP", YuGothic, "游ゴシック体", "Yu Gothic",
               "ヒラギノ角ゴ Pro", "Hiragino Kaku Gothic Pro",
               Meiryo, sans-serif;
  font-size: 16px;
  line-height: 2;
  color: var(--text);
  background: var(--white);
}

a { color: var(--navy-mid); text-decoration: none; }
a:hover { color: var(--red); text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

/* ========================
   HEADER BANNER
   ======================== */
.site-banner {
  display: block;
  width: 100%;
  background: var(--white);
  position: sticky;
  top: 0;
  z-index: 101;
}
.site-banner img {
  width: 100%;
  height: 90px;
  object-fit: contain;
  padding: 8px 24px;
}

/* ========================
   NAVIGATION
   ======================== */
nav.main-nav {
  background: var(--white);
  border-bottom: 1px solid var(--gray-line);
  position: sticky;
  top: 90px;
  z-index: 100;
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
}
.nav-logo img {
  width: 36px;
  height: 36px;
  border-radius: 4px;
}
.nav-menu {
  display: flex;
  align-items: stretch;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.nav-menu li a {
  display: flex;
  align-items: center;
  padding: 0 15px;
  height: 58px;
  color: var(--text);
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: .04em;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.nav-menu li a:hover {
  color: var(--red);
  border-bottom-color: var(--red);
  text-decoration: none;
}
.nav-menu li.active a {
  color: var(--navy);
  border-bottom-color: var(--navy);
  font-weight: 700;
  text-decoration: none;
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}
.nav-contact {
  font-size: 13px;
  color: #aaa;
}
.nav-contact:hover { color: var(--red); text-decoration: none; }
.nav-entry-btn {
  background: linear-gradient(to right, var(--red), #e84c2a);
  color: var(--white);
  padding: 10px 24px;
  border-radius: 100vmax;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .06em;
  transition: opacity .2s;
  white-space: nowrap;
}
.nav-entry-btn:hover { opacity: .85; color: var(--white); text-decoration: none; }
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--gray-line);
  color: var(--text);
  padding: 6px 12px;
  cursor: pointer;
  border-radius: 4px;
  font-size: 18px;
  line-height: 1;
}

/* ========================
   OUTER CONTAINER
   ======================== */
.site-content {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 48px 40px 100px;
}

/* ========================
   PAGE TITLE
   ======================== */
h1.page-title {
  font-size: 1.5em;
  font-weight: 900;
  color: var(--navy);
  margin: 0 0 1.6em;
  padding-bottom: .7em;
  border-bottom: 2px solid var(--navy);
  letter-spacing: -.01em;
}

/* ========================
   SECTION HEADING  ← iino.co.jp スタイル
   大きな英語見出し + 日本語サブ
   ======================== */
.section-head {
  margin: 80px 0 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--gray-line);
}
.section-head .s-en {
  display: block;
  font-family: "Montserrat", sans-serif;
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--navy);
  line-height: 1;
  margin-bottom: 6px;
}
/* 英字見出しの最初の文字を赤にする */
.section-head .s-en::first-letter {
  color: var(--red);
}
.section-head .s-ja {
  display: block;
  font-size: .8rem;
  font-weight: 500;
  color: var(--gray-text);
  letter-spacing: .08em;
}

/* タブパネル内など余白を抑える場合 */
.tab-panel .section-head { margin-top: 48px; }
.tab-panel .section-head:first-child { margin-top: 0; }

/* ========================
   TABLES
   ======================== */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
  margin-bottom: 1.4em;
  background: var(--white);
}
table th {
  width: 22%;
  background: var(--gray-bg);
  border: 1px solid var(--gray-line);
  border-left: 3px solid var(--navy);
  padding: 14px 16px;
  vertical-align: middle;
  font-weight: 700;
  text-align: left;
  color: var(--navy);
  font-size: 15px;
}
table td {
  background: var(--white);
  border: 1px solid var(--gray-line);
  border-left: none;
  padding: 14px 18px;
  vertical-align: top;
  color: var(--text);
}
table tr:hover th { border-left-color: var(--red); }
table tr:hover td { background: #fafafa; }
@media (max-width: 600px) {
  table th { display: block; width: 100%; border-left: 3px solid var(--navy); border-bottom: none; }
  table td { display: block; width: 100%; border-left: 1px solid var(--gray-line); border-top: none; }
}

/* ========================
   TABS
   ======================== */
.tab-list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--gray-line);
  flex-wrap: wrap;
}
.tab-list li button {
  background: transparent;
  border: none;
  color: #888;
  padding: 14px 24px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  font-family: inherit;
  letter-spacing: .04em;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color .18s, border-color .18s;
  white-space: nowrap;
}
.tab-list li button:hover { color: var(--navy); }
.tab-list li button.active {
  color: var(--navy);
  border-bottom-color: var(--navy);
  font-weight: 700;
}
.tab-panel { display: none; padding-top: 40px; }
.tab-panel.active { display: block; }

/* ========================
   SPONSOR GRID
   ======================== */
.sponsor-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  max-width: 680px;
  margin: 16px 0;
}
@media (min-width: 600px) { .sponsor-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 599px) {
  .sponsor-grid { gap: 6px; }
  .sponsor-card { padding: 8px; }
}
.sponsor-card {
  padding: 12px;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 170px;
  border: 1px solid var(--gray-line);
  transition: border-color .2s, box-shadow .2s;
}
.sponsor-card:hover { border-color: var(--navy); box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.sponsor-card.full-width { grid-column: span 2; height: 170px; }
.sponsor-card img { max-width: 100%; max-height: 100%; object-fit: contain; }
.sponsor-stack {
  display: flex;
  flex-direction: column;
  height: 170px;
  border: 1px solid var(--gray-line);
  background: var(--white);
  overflow: hidden;
}
.sponsor-stack .half-card {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  font-size: 14px;
  text-align: center;
  border-top: 1px solid #f0f0f0;
  color: var(--text);
}
.sponsor-stack .half-card:first-child { border-top: none; }
.sponsor-stack .half-card a { color: var(--navy-mid); }
.sponsor-header {
  grid-column: 1 / -1;
  font-weight: 700;
  font-size: 13px;
  color: var(--gray-text);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-top: 20px;
  padding-top: 12px;
  border-top: 1px solid var(--gray-line);
}
.sponsor-spacer { grid-column: 1 / -1; }

/* ========================
   BUTTON
   ======================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(to right, var(--red), #e84c2a);
  color: var(--white);
  padding: .75em 2em;
  border-radius: 100vmax;
  font-size: .88em;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: .06em;
  margin: 6px 0;
  transition: opacity .2s;
}
.btn:hover { opacity: .85; color: var(--white); text-decoration: none; }

/* ========================
   YOUTUBE
   ======================== */
.yt-embed {
  position: relative;
  padding-top: 56.25%;
  margin: 16px 0;
  overflow: hidden;
  border-radius: 8px;
}
.yt-embed iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}

/* ========================
   MAP
   ======================== */
.map-wrap { margin: 16px 0; overflow: hidden; border-radius: 8px; }
.map-wrap iframe { width: 100%; height: 420px; border: 0; display: block; }

/* ========================
   FOOTER
   ======================== */
footer.site-footer {
  background: var(--navy);
  text-align: center;
  padding: 40px 16px;
  font-size: 14px;
  color: rgba(255,255,255,.35);
  margin-top: 60px;
  letter-spacing: .06em;
}
footer.site-footer a { color: rgba(255,255,255,.35); }
footer.site-footer a:hover { color: rgba(255,255,255,.75); text-decoration: none; }

/* ========================
   HERO IMAGE
   ======================== */
.hero-img {
  width: 100%;
  height: calc(100svh - 138px);
  object-fit: cover;
  object-position: center top;
  display: block;
}
@media (max-width: 768px) {
  .hero-img {
    height: 55vw;
    min-height: 240px;
  }
}

/* ========================
   RESPONSIVE NAV
   ======================== */
@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-menu {
    display: none;
    width: 100%;
    flex-direction: column;
    padding: 4px 0 12px;
    background: var(--white);
    border-top: 1px solid var(--gray-line);
  }
  .nav-menu.open { display: flex; }
  .nav-contact { display: none; }
  .nav-inner { padding: 10px 16px; }
  .nav-menu li { width: 100%; }
  .nav-menu li a {
    height: auto;
    padding: 12px 16px;
    border-bottom: none;
    border-left: 2px solid transparent;
  }
  .nav-menu li a:hover,
  .nav-menu li.active a {
    border-bottom: none;
    border-left-color: var(--navy);
    background: var(--gray-bg);
  }
  .section-head .s-en { font-size: 1.6rem; }
  .site-content { padding: 40px 20px 80px; }
}

/* ========================
   INFO CARD
   ======================== */
.info-card {
  background: var(--gray-bg);
  padding: 24px 28px;
  margin-bottom: 20px;
  border-left: 3px solid var(--navy);
}

/* ========================
   MISC
   ======================== */
p { margin: .5em 0 1em; }
h4, h5 { font-weight: 700; font-size: 1em; margin: 1.8em 0 .6em; color: var(--navy); }
h6 { font-weight: 700; font-size: .95em; margin: 1.4em 0 .5em; color: var(--navy); }
hr { border: none; border-top: 1px solid var(--gray-line); margin: 32px 0; }
ol, ul { padding-left: 1.5em; }
ol li, ul li { margin-bottom: .5em; }

/* ========================
   ARCHIVE BADGE
   ======================== */
.archive-badge {
  display: inline-block;
  background: var(--navy);
  color: var(--white);
  font-family: "Montserrat", sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 4px 14px;
  margin-bottom: 12px;
}

/* ========================
   PAST COMPETITIONS CARDS  ← iino topics スタイル
   ======================== */
.past-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin: 32px 0 56px;
}
.past-card {
  background: var(--white);
  border: 1px solid var(--gray-line);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: box-shadow .25s;
}
.past-card:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,.12);
  text-decoration: none;
  color: inherit;
}
.past-card-img-wrap {
  overflow: hidden;
  height: 200px;
}
.past-card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  background: #ddd;
  transition: transform .4s ease;
}
.past-card:hover .past-card-img {
  transform: scale(1.06);
}
.past-card-body {
  padding: 20px 22px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  border-top: 2px solid var(--navy);
}
.past-card-year {
  font-family: "Montserrat", sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--red);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.past-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.5;
}
.past-card-sub {
  font-size: 15px;
  color: var(--gray-text);
  margin-top: 8px;
  line-height: 1.6;
}
.past-card-link {
  margin-top: auto;
  padding-top: 16px;
  font-family: "Montserrat", sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: .1em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
}
.past-card-link::after { content: '→'; }

/* ========================
   COMING SOON  ← iino セクション背景スタイル
   ======================== */
.coming-soon {
  background: var(--gray-bg);
  border-radius: 12px;
  padding: 64px 40px;
  text-align: center;
  margin: 32px 0 56px;
}
.coming-soon h2 {
  font-family: "Montserrat", sans-serif;
  font-size: 2rem;
  font-weight: 900;
  color: var(--navy);
  margin: 0 0 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.coming-soon p {
  color: var(--gray-text);
  font-size: 16px;
  margin: 4px 0;
}

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

.event-banner { margin: 0 -40px; }
@media (max-width: 768px) {
  .event-banner { margin: 0 -20px; }
}
