@charset "utf-8";

/* ==========================================================================
   modern_enhancement.css
   40〜50代・老眼対応タイポグラフィ ＆ Core Web Vitals 速度対策 ＆ 日本地図ビジュアル ＆ 公式ロゴ最適化
   ========================================================================== */

/* 0. ヘッダーロゴのサイズ最適化 (PC・SP共にヘッダー枠内に美しく整流化) */
#logo img, #header.pc #logo img, #header #logo img {
  max-height: 48px !important;
  width: auto !important;
  display: inline-block !important;
  vertical-align: middle !important;
}
#sp-logo img, #header.sp #sp-logo img, #header #sp-logo img {
  max-height: 32px !important;
  max-width: 125px !important;
  width: auto !important;
  display: inline-block !important;
  vertical-align: middle !important;
  object-fit: contain !important;
}

@media screen and (max-width: 768px) {
  #header.sp #header-inner {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 6px !important;
  }
  #header.sp #sp-logo {
    flex: 0 1 125px !important;
    overflow: hidden !important;
  }
  #header.sp #link-teacher {
    font-size: 10.5px !important;
    white-space: nowrap !important;
    flex: 1 1 auto !important;
    text-align: right !important;
    padding-right: 4px !important;
  }
  #header.sp .side-menu-btn {
    flex: 0 0 34px !important;
    width: 34px !important;
  }
}

/* 1. 40〜50代・シニア対応ユニバーサル・タイポグラフィ (文字拡大・ゆったり行間) */
body, #CONTENTS, .main-table td, p {
  font-size: 15px !important;
  line-height: 1.8 !important;
  letter-spacing: 0.04em !important;
  color: #1e293b !important;
}

/* 見出し H1 / H2 / H3 の視認性向上 */
h1, h1.mtop5, h1.page-ttl {
  font-size: 23px !important;
  font-weight: 800 !important;
  line-height: 1.5 !important;
  color: #003399 !important;
  letter-spacing: 0.03em !important;
}
@media screen and (max-width: 768px) {
  h1, h1.mtop5, h1.page-ttl {
    font-size: 19px !important;
    line-height: 1.45 !important;
  }
}

h2, h2.search-section-h2, h2.section-ttl {
  font-size: 19px !important;
  font-weight: 800 !important;
  letter-spacing: 0.03em !important;
  line-height: 1.5 !important;
}

h3, h3.h3-ttl, h3.box-ttl {
  font-size: 17px !important;
  font-weight: 800 !important;
  color: #003399 !important;
  line-height: 1.5 !important;
  letter-spacing: 0.03em !important;
}

/* スペック表・テーブルの文字サイズ底上げと読みやすさ */
.main-table table {
  font-size: 15px !important;
  letter-spacing: 0.035em !important;
}
.main-table th {
  font-size: 14.5px !important;
  font-weight: bold !important;
  color: #003399 !important;
  background-color: #f0f5ff !important;
  padding: 8px 12px !important;
  white-space: nowrap !important;
}
.main-table td {
  font-size: 15px !important;
  line-height: 1.75 !important;
  padding: 8px 12px !important;
  color: #1e293b !important;
}

/* 自己紹介文・メッセージのフォントサイズと行間 */
.main-table td p, .disp-message {
  font-size: 15.5px !important;
  line-height: 1.85 !important;
  letter-spacing: 0.04em !important;
  color: #1e293b !important;
}

/* 2. 写真リンク・先生名リンク（クリック誘導とインタラクション） */
.teacher-photo-link {
  display: block !important;
  position: relative !important;
  cursor: pointer !important;
  border-radius: 6px !important;
  overflow: hidden !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
  text-decoration: none !important;
}
.teacher-photo-link:hover {
  transform: scale(1.03) !important;
  box-shadow: 0 4px 14px rgba(0, 51, 153, 0.28) !important;
}
.teacher-photo-link::after {
  content: "詳細を見る";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 51, 153, 0.85);
  color: #ffffff;
  font-size: 11px;
  font-weight: bold;
  text-align: center;
  padding: 3px 0;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}
.teacher-photo-link:hover::after {
  opacity: 1;
}

.teacher-name-link {
  font-size: 16px !important;
  font-weight: 800 !important;
  color: #003399 !important;
  text-decoration: none !important;
  transition: color 0.15s ease !important;
}
.teacher-name-link:hover {
  color: #D80607 !important;
  text-decoration: underline !important;
}

/* 3. Core Web Vitals 速度対策 (レンダリング最適化 & CLS防止) */
.masonry9 {
  content-visibility: auto;
  contain-intrinsic-size: 220px;
}
.list-teacher-card, .slide {
  content-visibility: auto;
  contain-intrinsic-size: 140px;
}
.flo-l ul.ichange li img, .gallery-main-view img, .thumb-item img {
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

/* 4. 日本地図（Japan Visual Map）8地方色分けグリッド＆47都道府県連動 */
.japan-map-container {
  background: #ffffff;
  border: 1.5px solid #dbeafe;
  border-radius: 12px;
  padding: 20px;
  margin: 15px 0 25px;
  box-shadow: 0 4px 12px rgba(0, 51, 153, 0.05);
}
.japan-map-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e2e8f0;
}
.japan-map-header h3 {
  font-size: 16px;
  font-weight: bold;
  color: #003399;
  margin: 0;
}
.japan-map-flex {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
@media (max-width: 768px) {
  .japan-map-flex {
    flex-direction: column;
  }
}

.map-visual-board {
  flex: 0 0 340px;
  background: linear-gradient(135deg, #f0f7ff 0%, #e0effe 100%);
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 16px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.03);
}
@media (max-width: 768px) {
  .map-visual-board {
    width: 100%;
    flex: none;
    box-sizing: border-box;
  }
}
.map-board-title {
  font-size: 13px;
  font-weight: bold;
  color: #1e3a8a;
  text-align: center;
  margin-bottom: 10px;
}

/* 日本列島グリッド (7行×8列) */
.japan-grid-map {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(7, 36px);
  gap: 4px;
}
.map-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  user-select: none;
  text-align: center;
  line-height: 1.15;
}
.map-cell:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 4px 8px rgba(0,0,0,0.18);
  filter: brightness(0.95);
  z-index: 2;
}
.map-cell.active {
  outline: 3px solid #ff9900;
  box-shadow: 0 0 10px rgba(255, 153, 0, 0.6);
  z-index: 3;
}

/* 地方別色分け */
.cell-hokkaido { grid-column: 7 / span 2; grid-row: 1; background: #38bdf8; color: #0c4a6e !important; }
.cell-tohoku   { grid-column: 7 / span 2; grid-row: 2 / span 2; background: #7dd3fc; color: #0369a1 !important; }
.cell-kanto    { grid-column: 6 / span 2; grid-row: 4 / span 2; background: #0284c7; color: #ffffff !important; }
.cell-hokuriku { grid-column: 4 / span 2; grid-row: 3; background: #34d399; color: #064e3b !important; }
.cell-koshin   { grid-column: 5 / span 1; grid-row: 4; background: #6ee7b7; color: #065f46 !important; }
.cell-tokai    { grid-column: 5 / span 1; grid-row: 5; background: #10b981; color: #ffffff !important; }
.cell-kinki    { grid-column: 3 / span 2; grid-row: 4 / span 2; background: #f59e0b; color: #ffffff !important; }
.cell-chugoku  { grid-column: 2 / span 1; grid-row: 4; background: #f87171; color: #ffffff !important; }
.cell-shikoku  { grid-column: 2 / span 1; grid-row: 5; background: #ef4444; color: #ffffff !important; }
.cell-kyushu   { grid-column: 1 / span 1; grid-row: 5 / span 2; background: #a855f7; color: #ffffff !important; }
.cell-okinawa  { grid-column: 1 / span 1; grid-row: 7; background: #7e22ce; color: #ffffff !important; }

/* 47都道府県リストパネル */
.map-detail-panel {
  flex: 1;
}
.region-block {
  margin-bottom: 12px;
  padding: 10px 14px;
  background: #f8fafc;
  border-radius: 8px;
  border-left: 4px solid #003399;
  transition: all 0.2s ease;
}
.region-block.highlight {
  background: #eff6ff;
  border-left-color: #ff9900;
  box-shadow: 0 2px 8px rgba(0, 51, 153, 0.1);
}
.region-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.region-badge-pill {
  font-size: 13.5px;
  font-weight: bold;
  color: #1e293b;
}
.pref-chips-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.pref-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 13px;
  color: #334155 !important;
  text-decoration: none !important;
  transition: all 0.15s ease;
}
.pref-chip:hover {
  background: #003399 !important;
  color: #ffffff !important;
  border-color: #003399 !important;
  transform: translateY(-1px);
}
