﻿/**
 * about ページ専用CSS
 * このディレクトリ配下の見た目調整はここに書きます。
 */

.about-access {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin: 0 0 0.5rem;
  align-items: start;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.about-info {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  margin: 0;
  font-size: 0.95rem;
  color: #374151;
  line-height: 1.5;
  min-width: 0;
}

.about-info__item {
  display: grid;
  grid-template-columns: 6.5em minmax(0, 1fr);
  gap: 0.35rem 0.75rem;
  margin: 0;
}

.about-info__item dt {
  margin: 0;
  font-weight: 700;
  color: var(--color-navy);
}

.about-info__item dt::after {
  content: '：';
}

.about-info__item dd {
  margin: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.about-access__map {
  margin: 0;
  border: 1px solid var(--color-border);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 14rem;
  overflow: hidden;
  box-sizing: border-box;
}

.about-access__map iframe {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 100%;
  min-width: 0;
  border: 0;
}

@media (max-width: 767px) {
  .about-access__map {
    width: 100%;
    max-width: 100%;
  }

  .about-access__map iframe {
    width: 100%;
    max-width: 100%;
  }
}

@media (min-width: 768px) {
  .about-access {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: 2rem;
  }

  .about-access__map {
    min-height: 16rem;
  }
}

.about-business {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 2rem;
  margin: 0 0 0.5rem;
}

.about-business__item h4 {
  margin-top: 1.5em;
}

.about-business__item p {
  margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
  .about-business {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.about-org-chart {
  margin: 1.25rem 0 2.5rem;
  padding: 1.25rem 0.5rem 1.5rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.org-tree,
.org-tree ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.org-tree {
  display: flex;
  justify-content: center;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.org-tree ul {
  display: flex;
  justify-content: center;
  position: relative;
}

.org-tree li {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.25rem 0.4rem 0;
}

.org-tree > li {
  padding-top: 0;
}

/* 委員会など兄弟間：横線の下から各ボックスへの縦線 */
.org-tree li::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 1px;
  height: 1.25rem;
  margin-left: -0.5px;
  background: #6b7280;
}

.org-tree > li::before {
  display: none;
}

/*
 * 総会・理事会・三役会など縦連鎖：
 * 親ノード側で「ボックス下の縦ライン」を描くため、子の上向き線は消す
 */
.org-tree li:only-child::before {
  display: none;
}

/* 横線（兄弟間） */
.org-tree li::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: #6b7280;
}

.org-tree > li::after,
.org-tree li:only-child::after {
  display: none;
}

.org-tree li:first-child:not(:only-child)::after {
  left: 50%;
  width: 50%;
}

.org-tree li:last-child:not(:only-child)::after {
  left: auto;
  right: 50%;
  width: 50%;
}

.org-tree__node {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 6.5rem;
  min-height: 2.35rem;
  padding: 0.4rem 0.7rem;
  background: #1a2a40;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.35;
  text-align: center;
  white-space: nowrap;
  box-shadow: 1px 2px 0 rgba(0, 0, 0, 0.18);
}

/* 総会・理事会・三役会：ボックスの中に文字、下に縦ライン */
.org-tree__node:has(+ ul)::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  width: 1px;
  height: 1.25rem;
  margin-left: -0.5px;
  background: #6b7280;
  z-index: 0;
}

/* ---- 委員会（拡大前の4列幅） ---- */
/* 三役会→横線まで（4列の隙間へ伸ばさない） */
.org-tree__node:has(+ .org-tree__committees)::after {
  height: 1rem;
  transform: translateX(-50%);
  margin-left: 0;
}

.org-tree ul.org-tree__committees {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  max-width: 100%;
  padding-top: 1rem;
  box-sizing: border-box;
}

.org-tree__committees > li {
  flex: 0 1 16rem;
  width: 16rem;
  max-width: 16rem;
  min-width: 0;
  padding: 1.25rem 0.5rem 0;
  box-sizing: border-box;
}

.org-tree__committees > li::before {
  display: block;
  height: 1.25rem;
  transform: translateX(-50%);
  margin-left: 0;
}

.org-tree__committees .org-tree__node {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  font-size: 1rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
  line-height: 1.35;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

/* 所掌リストへのツリー線は出さない */
.org-tree__committees .org-tree__node:has(+ .org-tree__duties)::after {
  display: none;
}

/* 委員会の所掌（改行可・ぶら下げインデント） */
.org-tree ul.org-tree__duties {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  list-style: none;
  margin: 0.55rem 0 0;
  padding: 0;
  width: 100%;
  text-align: left;
}

.org-tree__duties > li {
  display: grid;
  grid-template-columns: 1em minmax(0, 1fr);
  column-gap: 0.1em;
  position: static;
  padding: 0.12rem 0;
  width: 100%;
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.45;
  color: #4b5563;
  letter-spacing: 0.02em;
  white-space: normal;
  word-break: break-all;
  overflow-wrap: anywhere;
  box-sizing: border-box;
}

.org-tree__duties > li::before {
  content: '・';
  position: static;
  display: block;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  background: none;
  transform: none;
  line-height: 1.45;
}

.org-tree__duties > li::after {
  content: none;
  display: none;
}

/* 狭い画面：委員会ボックスを縮小して横スクロールを防ぐ */
@media (max-width: 1100px) {
  .org-tree__committees > li {
    flex: 1 1 0;
    width: auto;
    max-width: none;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
  }

  .org-tree__committees .org-tree__node {
    font-size: clamp(0.7rem, 1.85vw, 0.95rem);
    letter-spacing: 0.02em;
    white-space: normal;
    padding-left: 0.3rem;
    padding-right: 0.3rem;
  }

  .org-tree__duties > li {
    font-size: clamp(0.65rem, 1.5vw, 0.8rem);
  }
}

@media (max-width: 767px) {
  .about-org-chart {
    padding: 0.75rem 0 1rem;
  }

  .org-tree__committees > li {
    padding-left: 0.15rem;
    padding-right: 0.15rem;
  }

  .org-tree__committees .org-tree__node {
    font-size: clamp(0.62rem, 2.8vw, 0.8rem);
    min-height: 2rem;
    padding-top: 0.3rem;
    padding-bottom: 0.3rem;
  }
}

/* ---- 組合員一覧 ---- */
.about-member-count {
  margin: 0 0 2rem;
  font-size: 0.75rem;
  color: #9ca3af;
}

.about-member-list {
  margin: 0 0 2.5rem;
  padding: 0;
  list-style: none;
  gap: 1rem 2rem;
}

.about-member-list__item {
  font-size: 0.875rem;
  color: #374151;
  border-bottom: 1px solid #f3f4f6;
  padding-bottom: 0.75rem;
}

/* ---- 統計データ ---- */
.about-stats__heading {
  font-size: 1.125rem;
  margin-bottom: 1rem;
}

.about-stats__hint {
  margin: 0 0 1rem;
  font-size: 0.75rem;
  color: #9ca3af;
}

.about-stats__body {
  border-top: 1px solid var(--color-border);
  padding-top: 1rem;
  background-color: var(--color-gray);
}

.about-stats__body > .download-row {
  background-color: var(--color-white);
  transition: background-color 0.2s, border-color 0.2s;
}

.about-stats__body > .download-row:hover {
  background-color: #e8eef5;
  border-color: var(--color-navy);
}

.about-stats-months {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

@media (min-width: 768px) {
  .about-stats-months {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.about-stats-months .download-row {
  padding: 0.5rem 1rem;
  background-color: var(--color-white);
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.about-stats-months .download-row:hover {
  background-color: #e8eef5;
  border-color: var(--color-navy);
}

.about-stats-months .download-row:hover .download-row__label,
.about-stats-months .download-row:hover .download-row__action {
  color: var(--color-navy);
}

.about-stats-months .download-row + .download-row {
  margin-top: 0;
}

/* ---- あゆみ：年代ナビ + タイムライン ---- */
.timeline-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.timeline-nav {
  margin: 0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.timeline-nav__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1rem;
  margin: 0;
  padding: 0 0 0.75rem;
  list-style: none;
  border-bottom: 1px solid var(--color-border);
}

.timeline-nav__list > li {
  position: relative;
  flex: 0 0 auto;
}

.timeline-nav__link {
  display: inline-block;
  padding: 0.15rem 0;
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--color-navy);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.timeline-nav__link:hover,
.timeline-nav__link:focus-visible {
  opacity: 0.7;
}

.timeline__item[id] {
  scroll-margin-top: calc(var(--header-height) + 1rem);
}

@media (max-width: 767px) {
  .timeline-layout {
    gap: 0;
  }

  .timeline {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  /* 年月＋本文を縦積みにしてはみ出し防止 */
  .timeline__item {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 0.05rem;
    column-gap: 0;
  }

  .timeline__year {
    white-space: normal;
  }

  .timeline__text {
    padding-left: 1em; /* 1文字分右へずらして年月と差別化 */
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}

@media (min-width: 768px) {
  .timeline-layout {
    grid-template-columns: 12rem minmax(0, 1fr);
    gap: 2.5rem;
  }

  .timeline-nav {
    position: sticky;
    top: calc(var(--header-height) + 1rem);
    padding-left: 4rem;
  }

  .timeline-nav__list {
    position: relative;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0;
    padding: 0.15rem 0 0.15rem 1.35rem;
    overflow: visible;
    border-bottom: 0;
  }

  /* 年度をつなぐ縦ライン */
  .timeline-nav__list::before {
    content: "";
    position: absolute;
    left: 0.35rem;
    top: 0.7rem;
    bottom: 0.7rem;
    width: 2px;
    background: var(--color-navy);
    opacity: 0.28;
  }

  .timeline-nav__list > li {
    padding: 0.7rem 0;
  }

  .timeline-nav__list > li::before {
    content: "";
    position: absolute;
    left: -1.35rem;
    top: 50%;
    width: 0.7rem;
    height: 0.7rem;
    margin-top: -0.35rem;
    border-radius: 50%;
    background: var(--color-white);
    border: 2px solid var(--color-navy);
    box-sizing: border-box;
    z-index: 1;
    transition: background-color 0.15s ease, border-color 0.15s ease;
  }

  .timeline-nav__list > li:has(.timeline-nav__link:hover)::before,
  .timeline-nav__list > li:has(.timeline-nav__link:focus-visible)::before {
    background: var(--color-navy);
  }

  .timeline-nav__link {
    font-size: 1rem;
    letter-spacing: 0.08em;
  }
}


