/* =============================================================
   一般財団法人キャンパスOJT型産学連携教育推進財団  サイト共通CSS
   -------------------------------------------------------------
   旧サイト（WordPress / Twenty Seventeen テーマ）の見た目を踏襲した
   自前のスタイルシートです。全ページがこの1ファイルだけを読み込みます。

   目次
     1. 基本設定（色・文字）
     2. ヘッダー（写真・ロゴ・サイト名）
     3. ナビゲーション（メニュー）
     4. 本文レイアウト（左：ページ名 ／ 右：本文）
     5. 本文内の要素（見出し・リスト・表・地図など）
     6. ホーム専用（セクションへのリンク）
     7. フッター（SNS・コピーライト）
     8. スマートフォン向け調整
   ============================================================= */


/* ---------- 1. 基本設定 ---------- */

:root {
  --color-text:    #333;
  --color-heading: #222;
  --color-link:    #222;
  --color-border:  #eee;
  --color-muted:   #767676;
  --color-accent:  #5a3fa0;   /* ロゴの紫系。強調に使用 */
  --color-red:     #c0392b;
  --font-body: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN",
               "Hiragino Sans", Meiryo, "Yu Gothic", "Noto Sans JP", sans-serif;
  --content-width: 1000px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: #fff;
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--color-link);
  text-decoration: underline;
  text-decoration-color: #ccc;
  text-underline-offset: 3px;
}
a:hover,
a:focus { color: #000; text-decoration-color: var(--color-accent); }

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

.wrap {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 2em;
}

/* スクリーンリーダー用（視覚的には非表示） */
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: #222; color: #fff; padding: .5em 1em; z-index: 1000;
}
.skip-link:focus { left: 0; }


/* ---------- 2. ヘッダー ---------- */

.site-header {
  position: relative;
  color: #fff;
  background: #222 url("../images/header.jpg") center 60% / cover no-repeat;
  min-height: 220px;
}
/* ホームでは写真を大きく見せる */
.home .site-header { min-height: 70vh; }

.site-header::after {           /* 文字を読みやすくする薄い影 */
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.55) 0%, rgba(0,0,0,0) 45%);
}

.site-branding {
  position: absolute; left: 0; right: 0; bottom: 0;
  z-index: 1;
  padding: 1.5em 0;
}
.site-branding .wrap {
  display: flex;
  align-items: center;
  gap: 1.25em;
}
.site-logo img {
  width: 80px; height: 80px;
  display: block;
  background: rgba(255,255,255,.85);
  border-radius: 4px;
  padding: 4px;
}
.site-title {
  margin: 0;
  font-size: 2rem;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: .02em;
}
.site-title a { color: #fff; text-decoration: none; }
.site-description {
  margin: .25em 0 0;
  font-size: 1.25rem;
  font-weight: 400;
  opacity: .95;
}


/* ---------- 3. ナビゲーション ---------- */

.main-navigation {
  position: sticky; top: 0; z-index: 10;
  background: #fff;
  border-bottom: 1px solid var(--color-border);
}
.main-navigation ul {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}
.main-navigation li { margin: 0; }
.main-navigation a {
  display: block;
  padding: 1.1em 1.25em;
  font-size: .9rem;
  font-weight: 700;
  text-decoration: none;
  color: #222;
}
.main-navigation a:hover { color: var(--color-muted); }
.main-navigation a[aria-current="page"] { color: var(--color-muted); }

/* ハンバーガーボタン（スマホのみ表示。CSSのみで開閉） */
.menu-toggle-checkbox { display: none; }
.menu-toggle {
  display: none;
  cursor: pointer;
  padding: .9em 1.5em;
  font-weight: 700;
  font-size: .9rem;
  user-select: none;
}
.menu-toggle::before { content: "☰"; margin-right: .5em; }


/* ---------- 4. 本文レイアウト ---------- */

.site-content { padding: 4em 0 5em; }

.site-content .wrap {
  display: grid;
  grid-template-columns: 1fr 2fr;   /* 左：ページ名／右：本文 */
  gap: 2em 4em;
}

.entry-header { grid-column: 1; }
.entry-content { grid-column: 2; }

.entry-title {
  margin: 0;
  font-size: .95rem;
  font-weight: 700;
  color: #222;
  letter-spacing: .05em;
}
.breadcrumb {
  margin: 1em 0 0;
  font-size: .8rem;
  color: var(--color-muted);
}
.breadcrumb a { color: var(--color-muted); }
.breadcrumb span::before { content: "›"; margin: 0 .4em; }

/* ---------- 5. 本文内の要素 ---------- */

.entry-content > :first-child { margin-top: 0; }

.entry-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 2em 0 .75em;
  color: var(--color-heading);
}
.entry-content h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 2em 0 .75em;
  color: var(--color-heading);
}
.entry-content h4 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 2em 0 .5em;
  color: var(--color-heading);
}
.entry-content p { margin: 0 0 1.25em; }

.entry-content .lead {
  font-size: .95rem;
  color: var(--color-muted);
}

.entry-content ul,
.entry-content ol { padding-left: 1.5em; margin: 0 0 1.25em; }

/* 財団概要の「項目名／内容」リスト */
.info-list { margin: 0 0 2em; }
.info-list dt {
  font-weight: 700;
  margin-top: 1.25em;
  color: var(--color-heading);
}
.info-list dd { margin: .25em 0 0 1.5em; }

/* 寄附者一覧 */
.donor-list {
  list-style: none;
  padding: 0;
  columns: 2;
  column-gap: 2em;
}
.donor-list li { break-inside: avoid; padding: .15em 0; }

/* 役員一覧など、位置をそろえたい簡易テーブル */
table.plain { border-collapse: collapse; margin: 0 0 1.25em; }
table.plain th,
table.plain td { text-align: left; vertical-align: top; padding: .2em 1.5em .2em 0; }
table.plain th { font-weight: 400; white-space: nowrap; }

/* 補足・注意 */
.note  { font-size: .95rem; }
.red   { color: var(--color-red); }
.green { color: #0b7a3b; }
.box {
  border: 1px solid var(--color-border);
  background: #fafafa;
  padding: 1.25em 1.5em;
  margin: 0 0 1.5em;
}
.box > :last-child { margin-bottom: 0; }

/* ダウンロードボタン風リンク */
.btn {
  display: inline-block;
  padding: .5em 1.25em;
  margin: 0 .5em .5em 0;
  border: 1px solid #222;
  border-radius: 3px;
  text-decoration: none;
  font-size: .9rem;
}
.btn:hover { background: #222; color: #fff; }

/* Googleマップ */
.map {
  position: relative;
  padding-top: 66%;      /* 3:2 */
  margin: 0 0 1.5em;
  background: #eee;
}
.map iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
}


/* ---------- 6. ホーム専用 ---------- */

.home .site-content .wrap { display: block; }

.section-links {
  list-style: none;
  padding: 0;
  margin: 2em 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5em;
}
.section-links a {
  display: block;
  height: 100%;
  padding: 1.5em;
  border: 1px solid var(--color-border);
  text-decoration: none;
  transition: border-color .2s;
}
.section-links a:hover { border-color: #222; }
.section-links strong {
  display: block;
  font-size: 1.1rem;
  margin-bottom: .4em;
}
.section-links span {
  display: block;
  font-size: .9rem;
  color: var(--color-muted);
}


/* ---------- 7. フッター ---------- */

.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 2em 0;
  font-size: .85rem;
}
.site-footer .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1em;
}
.social-navigation ul {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  gap: .75em;
}
.social-navigation a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--color-muted);
  color: #fff;
  text-decoration: none;
}
.social-navigation a:hover { background: #222; }
.social-navigation svg { width: 16px; height: 16px; fill: currentColor; }

.site-info { color: #333; }


/* ---------- 8. スマートフォン向け調整 ---------- */

@media (max-width: 767px) {
  .wrap { padding: 0 1.25em; }

  .site-header { min-height: 240px; }
  .home .site-header { min-height: 55vh; }
  .site-logo img { width: 56px; height: 56px; }
  .site-title { font-size: 1.25rem; }
  .site-description { font-size: .95rem; }

  /* メニューを折りたたむ */
  .menu-toggle { display: block; }
  .main-navigation ul {
    display: none;
    flex-direction: column;
    border-top: 1px solid var(--color-border);
  }
  .menu-toggle-checkbox:checked ~ ul { display: flex; }
  .main-navigation a {
    padding: .9em 1.5em;
    border-bottom: 1px solid var(--color-border);
  }

  .site-content { padding: 2.5em 0 3em; }
  .site-content .wrap {
    grid-template-columns: 1fr;
    gap: 1em;
  }
  .entry-header,
  .entry-content { grid-column: 1; }
  .entry-title { font-size: 1.4rem; }

  .donor-list { columns: 1; }

  .site-footer .wrap { justify-content: center; text-align: center; }
}

@media print {
  .site-header { background: none; color: #000; min-height: 0; }
  .site-header::after { display: none; }
  .site-branding { position: static; }
  .site-title a { color: #000; }
  .main-navigation, .social-navigation, .skip-link { display: none; }
  .site-content .wrap { display: block; }
}
