/* ===== ABC Learning Lab Osaka — Company / generic inner page styles ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:  #1A5BA8;
  --blue:  #1A4F8F;
  --blue-l:#4A8FCC;
  --red:   #D42B2B;
  --red-l: #E85050;
  --off:   #F0F0F0;
  --cream: #EDE9E1;
  --white: #FFFFFF;
  --ink:   #111111;
  --mid:   #444444;
  --muted: #888888;
  --border:#DDDAD3;
  --serif: 'DM Serif Display', Georgia, serif;
  --sans:  'Noto Sans JP', sans-serif;
}

html { scroll-behavior: smooth; overflow-x: hidden; }
body { font-family: var(--sans); color: var(--ink); background: var(--white); line-height: 1.75; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

.nav {
  position: sticky; top: 0; z-index: 200;
  height: 72px; background: var(--white);
  border-bottom: 3px solid var(--red);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 5vw;
}
.nav-logo { display: flex; align-items: center; text-decoration: none; }
.nav-logo-icon { height: 54px; width: auto; display: block; }
.nav-logo-text { display: none; font-family: var(--serif); font-size: 17px; color: var(--navy); line-height: 1.2; }
.nav-logo-text small { display: block; font-family: var(--sans); font-size: 9px; font-weight: 700; letter-spacing: 0.18em; color: var(--red); text-transform: uppercase; margin-top: 2px; }
.nav-items { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav-items a { font-size: 13px; font-weight: 500; color: var(--mid); padding: 7px 14px; border-radius: 6px; text-decoration: none; transition: color .15s, background .15s; }
.nav-items a:hover, .nav-items a.active { color: var(--navy); background: var(--off); }
.nav-cta,
.nav-contact { font-size: 13px; font-weight: 700; letter-spacing: 0.05em; background: var(--red); color: var(--white); padding: 9px 22px; border-radius: 24px !important; text-decoration: none; transition: background .15s; }
.nav-cta:hover,
.nav-contact:hover { background: var(--red-l); }

footer { background: #0A3060; padding: 40px 5vw 28px; }
.footer-row { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 20px; padding-bottom: 24px; border-bottom: 1px solid rgba(255,255,255,0.07); margin-bottom: 18px; }
.footer-brand { font-family: var(--serif); font-size: 15px; color: var(--white); margin-bottom: 4px; }
.footer-tag,
.footer-tagline { font-size: 10px; letter-spacing: 0.1em; color: rgba(255,255,255,0.28); }
.footer-nav { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; list-style: none; }
.footer-nav a { font-size: 11px; font-weight: 500; color: rgba(255,255,255,0.35); text-decoration: none; transition: color .15s; }
.footer-nav a:hover { color: rgba(255,255,255,0.75); }
.footer-copy { font-size: 10px; color: rgba(255,255,255,0.18); letter-spacing: 0.08em; }

/* PAGE HERO */
.page-hero {
  background: var(--navy); padding: 64px 5vw 52px;
  position: relative; overflow: hidden;
}
.page-hero::before {
  content: ''; position: absolute; top: -120px; left: -80px;
  width: 500px; height: 500px; border-radius: 50%;
  background: radial-gradient(circle, rgba(26,79,143,0.28) 0%, transparent 60%);
  pointer-events: none;
}
.page-hero-inner { position: relative; z-index: 1; }
.breadcrumb { font-size: 12px; color: rgba(255,255,255,0.38); margin-bottom: 14px; letter-spacing: 0.05em; }
.breadcrumb a { color: inherit; transition: color .15s; }
.breadcrumb a:hover { color: rgba(255,255,255,0.75); }
.breadcrumb span { margin: 0 8px; }
.page-h1 { font-family: var(--serif); font-size: clamp(28px, 3.5vw, 44px); font-weight: 400; color: var(--white); line-height: 1.2; margin-bottom: 8px; }
.page-sub { font-size: 13px; font-weight: 300; color: rgba(255,255,255,0.4); letter-spacing: 0.1em; }

/* BODY */
.page-body { max-width: 840px; margin: 0 auto; padding: 72px 5vw 100px; }

/* PHILOSOPHY */
.philosophy {
  border-left: 4px solid var(--red);
  padding: 28px 32px; margin-bottom: 64px;
  background: var(--off); border-radius: 0 4px 4px 0;
}
.philosophy-title { font-family: var(--serif); font-size: 20px; color: var(--navy); margin-bottom: 14px; }
.philosophy-body { font-size: 14px; color: var(--mid); line-height: 2.0; }

/* SECTION */
.sec { margin-bottom: 60px; }
.sec-label {
  font-size: 10px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--red); margin-bottom: 18px;
  display: flex; align-items: center; gap: 12px;
}
.sec-label::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* TABLE */
.co-table { width: 100%; border-collapse: collapse; }
.co-table th { text-align: left; padding: 14px 0 14px 0; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; color: var(--muted); width: 160px; vertical-align: top; }
.co-table td { padding: 14px 0 14px 20px; font-size: 14px; color: var(--ink); line-height: 1.75; vertical-align: top; }
.co-table td a { color: var(--blue); }
.co-table td a:hover { text-decoration: underline; }

/* PUBLISHERS */
.pub-wrap { display: flex; flex-wrap: wrap; gap: 6px; }
.pub-tag {
  background: var(--white); border: 1px solid var(--border); border-radius: 3px;
  padding: 6px 12px; font-size: 12px; font-weight: 500; color: var(--blue);
  transition: border-color .15s;
}
.pub-tag:hover { border-color: var(--blue); }

/* CTA */
.co-cta {
  background: var(--blue); border-radius: 12px !important; padding: 44px 36px; text-align: center;
}
.co-cta-title { font-family: var(--serif); font-size: 24px; color: var(--white); margin-bottom: 10px; }
.co-cta-body { font-size: 13px; color: rgba(255,255,255,0.55); margin-bottom: 24px; }
.btn-red {
  display: inline-block;
  padding: 13px 40px;
  border-radius: 999px !important;
  -webkit-border-radius: 999px !important;
  -moz-border-radius: 999px !important;
  font-size: 14px; font-weight: 700; letter-spacing: 0.06em;
  background: var(--red); color: var(--white);
  transition: background .15s, transform .12s;
  border: none;
  outline: none;
}
.btn-red:hover { background: var(--red-l); transform: translateY(-2px); }

/* Generic WordPress content (page.php fallback) */
.entry-content { font-size: 14px; color: var(--mid); line-height: 1.95; }
.entry-content h2 { font-family: var(--serif); font-size: 22px; color: var(--navy); margin: 32px 0 14px; }
.entry-content h3 { font-family: var(--serif); font-size: 18px; color: var(--navy); margin: 24px 0 12px; }
.entry-content p { margin-bottom: 16px; }
.entry-content a { color: var(--blue); text-decoration: underline; }
.entry-content ul, .entry-content ol { margin: 0 0 16px 1.4em; }
.entry-content img { border-radius: 8px; margin: 16px 0; }

/* ============================================================
 * 取扱教材ページ（page-materials.php）
 * 本文は管理画面の通常エディタで編集。「出版社名＝1リンク」の
 * リストを、自動でタグ（チップ）状に整形する。
 * → 編集者はCSSに触れず、リストの文字とリンクだけ管理すればよい。
 * ============================================================ */
.materials-intro { font-size: 14px; color: var(--mid); line-height: 1.95; margin-bottom: 28px; }

/* 均等グリッド：セル幅を揃え、名前の長短に関わらず整列を保つ。
   1行内のセルは同じ高さに伸び、長い名前はセル内で折り返す。 */
.materials-body ul,
.materials-body ol {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
  gap: 12px;
  padding: 0;
  margin: 0 0 8px;
}
.materials-body li { margin: 0; display: flex; } /* 子要素をセルいっぱいに伸ばす */

/* リンク済みの項目 → 青いクリック可能なセル */
.materials-body li a {
  display: flex; align-items: center; justify-content: center;
  width: 100%; min-height: 56px;
  text-align: center; line-height: 1.5; word-break: break-word;
  background: var(--white); border: 1px solid var(--border); border-radius: 8px;
  padding: 12px 16px; font-size: 14px; font-weight: 500; color: var(--blue);
  text-decoration: none;
  transition: border-color .15s, box-shadow .15s, transform .12s;
}
.materials-body li a:hover {
  border-color: var(--blue); box-shadow: 0 4px 14px rgba(26,91,168,0.12); transform: translateY(-2px);
}
/* まだリンク未設定（プレーンテキスト）の項目 → 破線のグレーセル */
.materials-body li:not(:has(a)) {
  align-items: center; justify-content: center;
  width: 100%; min-height: 56px;
  text-align: center; line-height: 1.5; word-break: break-word;
  background: var(--off); border: 1px dashed var(--border); border-radius: 8px;
  padding: 12px 16px; font-size: 14px; color: var(--muted);
}
.materials-note { font-size: 12px; color: var(--muted); margin: 4px 0 28px; }

@media (max-width: 700px) {
  .nav-items { display: none; }
  .co-table th { width: 110px; font-size: 10px; }
  .co-table td { padding-left: 12px; font-size: 13px; }
  .philosophy { padding: 20px; }
  .materials-body ul, .materials-body ol {
    grid-template-columns: repeat(2, 1fr); gap: 8px;
  }
  .materials-body li a, .materials-body li:not(:has(a)) {
    min-height: 50px; padding: 10px 12px; font-size: 13px;
  }
}
