/* ==========================================================================
   Human Love Aid — 共通スタイル
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Roboto", "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: #333;
  background: #fff;
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

a {
  color: #0066cc;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1, h2, h3, h4 {
  line-height: 1.4;
}

figure {
  margin: 0;
}

table {
  border-collapse: collapse;
}

/* Layout */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.875rem;
}

.page__noscript {
  margin: 0;
  padding: 0.5rem;
  text-align: center;
  background: #fff3cd;
}

/* Header */
.site-header {
  padding: 0.75rem 1.5rem;
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header__inner {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 1rem;
  max-width: 100%;
  margin: 0 auto;
}

.site-header__brand {
  flex: 1 1 auto;
  min-width: 0;
}

.site-header__nav-wrap {
  position: relative;
  flex: 0 0 auto;
  margin-left: auto;
}

.site-header__logo-link {
  display: block;
}

.site-header__logo {
  display: block;
  height: 50px;
  width: auto;
}

.site-header__brand-text {
  margin: 0;
}

.site-header__lead {
  margin: 0 0 0.25rem;
  font-size: 0.8125rem;
  color: #666;
}

.site-header__title {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
}

.site-header__title-text {
  font-family: "Roboto Slab", serif;
}

.site-header__toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem;
  border: 1px solid #ccc;
  border-radius: 3px;
  background: #fff;
  cursor: pointer;
}

.site-header__toggle-icon {
  display: block;
  width: 1.25rem;
  height: 2px;
  background: #333;
  box-shadow: 0 6px 0 #333, 0 -6px 0 #333;
}

.site-header__menu-panel {
  display: none;
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 240px;
  max-width: min(320px, calc(100vw - 2rem));
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0.5rem 0;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  z-index: 101;
}

.site-header__menu-panel.is-open {
  display: flex;
}

.site-header__nav {
  width: 100%;
}

.site-header__menu {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-header__menu-item {
  display: block;
}

.site-header__menu-link {
  display: block;
  padding: 0.75rem 1rem;
  color: #333;
  font-size: 0.875rem;
  text-decoration: none;
  border-radius: 0;
  transition: background 0.2s;
}

.site-header__menu-link:hover {
  background: #f0f0f0;
  text-decoration: none;
}

.site-header__menu-link--active {
  background: #f4e23a;
  font-weight: 700;
}

.site-header__links {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  gap: 0;
  margin-top: 0.25rem;
  padding-top: 0.25rem;
  border-top: 1px solid #eee;
}

.site-header__link {
  display: block;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  white-space: nowrap;
  border-radius: 0;
}

.site-header__link:hover {
  background: #f0f0f0;
  text-decoration: none;
}

/* トップ以外: ヘッダーブランドを中央寄せ、メニューは右端 */
.page:not(.page--home) .site-header__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem 1rem;
}

.page:not(.page--home) .site-header__brand {
  grid-column: 2;
  flex: none;
  min-width: 0;
  text-align: center;
}

.page:not(.page--home) .site-header__nav-wrap {
  grid-column: 3;
  justify-self: end;
  margin-left: 0;
}

.page:not(.page--home) .site-header__title-link {
  color: inherit;
  text-decoration: none;
}

.page:not(.page--home) .site-header__title-link:hover {
  opacity: 0.85;
  text-decoration: none;
}

@media (max-width: 640px) {
  .page:not(.page--home) .site-header__lead {
    display: none;
  }

  .page:not(.page--home) .site-header__title {
    font-size: 1.375rem;
  }
}

/* Legacy page nav (list style, used by report/home/about等) */
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav__link {
  display: block;
  padding: 0.5rem 0.875rem;
  color: #333;
  font-size: 0.875rem;
  border-radius: 3px;
}

.site-nav__link:hover {
  background: #f0f0f0;
  text-decoration: none;
}

.site-nav__link--active {
  background: #f4e23a;
  font-weight: 700;
}

/* Disc-style nav (TKR/EVENT系ページ) */
.site-nav--disc {
  display: block;
}

.site-nav--disc .site-nav__item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0;
}

.site-nav--disc .site-nav__icon {
  width: 12px;
  height: auto;
}

/* Hero (共通ビルボード) */
.hero {
  padding: 2rem 1.5rem;
  text-align: center;
  background-position: center center;
  background-size: cover;
}

.hero__label {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
}

.hero__subtitle {
  margin: 0;
  font-size: 1.75rem;
}

.hero__subtitle-text {
  font-family: "Source Code Pro", monospace;
}

.hero__image {
  margin: 0;
}

/* Main content area */
.main {
  min-height: 50vh;
}

.content-section {
  padding: 2.5rem 0;
}

.content-section__heading {
  margin: 0 0 1.5rem;
  text-align: center;
  font-size: 1.5rem;
}

.content-section__body {
  box-sizing: border-box;
  max-width: 1100px;
  margin: 0 auto;
  padding-left: clamp(1.5rem, 6vw, 3.5rem);
  padding-right: clamp(1.5rem, 6vw, 3.5rem);
}

.content-section__body p {
  margin: 0 0 1rem;
  font-size: 1rem;
  line-height: 1.8;
  color: #333;
}

.content-section__body p:last-child {
  margin-bottom: 0;
}

.content-section__body figure {
  margin: 0 0 1.5rem;
}

.content-section__body figure img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Grid utilities */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.grid-aside {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2rem;
  align-items: start;
}

.grid-aside--reverse {
  grid-template-columns: 1fr 2fr;
}

/* Card */
.card {
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 4px;
}

.card__title {
  margin: 0 0 1rem;
  font-size: 1rem;
  text-align: center;
}

.card__image {
  margin: 0 0 1rem;
  text-align: center;
}

.card__text {
  margin: 0;
}

/* Profile block */
.profile {
  padding: 2.5rem 0;
}

.profile__inner {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.875rem;
}

.profile__photo {
  text-align: center;
}

.profile__table {
  width: 100%;
}

.profile__table td {
  vertical-align: top;
  padding: 0.25rem 0;
}

.profile__table p {
  margin: 0;
}

/* Footer */
.site-footer {
  padding: 1.875rem;
  background: #f5f5f5;
  text-align: center;
}

.site-footer__bocko-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  max-width: 800px;
  margin: 0 auto 1.5rem;
}

.site-footer__bocko-grid a {
  display: block;
}

.site-footer__nav {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.site-footer__divider {
  margin: 0 auto 1rem;
  max-width: 1100px;
  border: none;
  border-top: 1px solid #ccc;
}

.site-footer__copyright {
  margin: 0;
  font-size: 0.875rem;
  color: #666;
}

.site-footer__top-link {
  display: inline-block;
  margin-bottom: 1rem;
}

/* FAQ list (dl/dt/dd) */
.faq-list {
  margin: 0 0 1.5rem;
  padding: 1rem 1.25rem;
  border-left: 3px solid #f4e23a;
  background: #fafafa;
}

.faq-list:last-of-type {
  margin-bottom: 0;
}

.faq-list dt {
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.faq-list dd {
  margin: 0 0 0.5rem;
}

/* Simple data table (定款・役員情報など) */
.simple-table {
  width: 100%;
  margin: 0 0 1.5rem;
}

.simple-table th {
  width: 8em;
  text-align: left;
  vertical-align: top;
  padding: 0.5rem;
  background: #f5f5f5;
  font-weight: 700;
}

.simple-table td {
  padding: 0.5rem;
  vertical-align: top;
}

/* Prev/Next link row */
.prev-next {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1.875rem;
}

.prev-next__link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 1.875rem;
}

.pagination__numbers {
  text-align: center;
}

/* ==========================================================================
   Responsive — モバイル・タブレット対応
   ブレークポイント: 1024px (タブレット) / 768px (スマホ横) / 480px (スマホ縦)
   ========================================================================== */

/* ベース: テキストの読みやすさ・はみ出し防止 */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  overflow-x: hidden;
}

p,
li,
td,
th,
dd,
dt {
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.content-section__heading {
  font-size: clamp(1.25rem, 4vw, 1.5rem);
}

.content-section__body p {
  font-size: clamp(0.9375rem, 2.5vw, 1rem);
  line-height: 1.85;
}

/* タブレット以下 (1024px) */
@media (max-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .content-section__body {
    padding-left: clamp(1.25rem, 4vw, 2rem);
    padding-right: clamp(1.25rem, 4vw, 2rem);
  }
}

/* スマホ横・小型タブレット (768px) */
@media (max-width: 768px) {
  .grid-2,
  .grid-aside,
  .profile__inner {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .grid-3 {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .site-footer__bocko-grid {
    grid-template-columns: 1fr;
  }

  .container,
  .profile__inner {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  /* ヘッダー共通 */
  .site-header {
    padding: 0.625rem 1rem;
  }

  .site-header__logo {
    height: 40px;
  }

  .site-header__title {
    font-size: 1.375rem;
  }

  .site-header__lead {
    font-size: 0.75rem;
    line-height: 1.4;
  }

  /* サブページヘッダー: 3列グリッド → フレックス */
  .page:not(.page--home) .site-header__inner {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
  }

  .page:not(.page--home) .site-header__brand {
    grid-column: auto;
    flex: 1 1 auto;
    min-width: 0;
    text-align: left;
  }

  .page:not(.page--home) .site-header__nav-wrap {
    grid-column: auto;
    flex: 0 0 auto;
    margin-left: 0;
  }

  .page:not(.page--home) .site-header__lead {
    display: none;
  }

  /* サブページヒーロー */
  .hero {
    padding: 1rem;
  }

  .hero__label {
    font-size: 1.25rem;
  }

  .hero__subtitle {
    font-size: 1.375rem;
  }

  /* コンテンツセクション */
  .content-section {
    padding: 1.75rem 0;
  }

  .card {
    padding: 1.25rem;
  }

  /* プロフィール */
  .profile {
    padding: 1.75rem 0;
  }

  .profile__table td {
    display: block;
    width: 100%;
    padding: 0.25rem 0;
  }

  /* フッター・ページ送り */
  .site-footer {
    padding: 1.25rem 1rem;
  }

  .prev-next,
  .pagination {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem 1rem;
    padding: 1.25rem 1rem;
  }

  .pagination__numbers {
    order: -1;
    width: 100%;
    font-size: 0.8125rem;
    line-height: 1.8;
    word-break: break-all;
  }

  .prev-next__link img {
    max-height: 14px;
    width: auto;
  }

  .site-footer__nav {
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
  }

  /* テーブル: 横スクロール対応 */
  .about-info,
  .content-section__body {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .simple-table {
    min-width: 0;
  }
}

/* スマホ縦 (480px) */
@media (max-width: 480px) {
  body {
    font-size: 15px;
    line-height: 1.75;
  }

  .site-header__title {
    font-size: 1.125rem;
  }

  .content-section__heading {
    margin-bottom: 1.25rem;
  }

  .faq-list {
    padding: 0.875rem 1rem;
  }

  /* テーブルをカード型に */
  .simple-table thead {
    display: none;
  }

  .simple-table tr {
    display: block;
    margin-bottom: 0.75rem;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
  }

  .simple-table th,
  .simple-table td {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }

  .simple-table th {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #e8e8e8;
  }

  .simple-table td {
    padding: 0.5rem 0.75rem;
  }

  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .prev-next {
    flex-direction: column;
    align-items: center;
  }
}
