/* ===== リセット & ベース ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary: #1a3a5c;
  --accent: #e8a020;
  --text: #222;
  --text-light: #666;
  --bg: #fff;
  --bg-alt: #f0f2f5;
  --white: #fff;
  --card-bg: #e8eaed;
  --radius: 10px;
  --shadow: 0 1px 6px rgba(0,0,0,0.12);
  --shadow-hover: 0 4px 18px rgba(0,0,0,0.18);
  --transition: 0.18s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Roboto', 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'Meiryo', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-size: 16px;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; }

/* ===== ヘッダー ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid #ddd;
  transition: box-shadow var(--transition);
  /* サーチバー・ドロップダウンの基準点 */
  overflow: visible;
}

.header.scrolled {
  box-shadow: 0 2px 10px rgba(0,0,0,0.12);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 40px;
  height: 72px;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-logo img {
  height: 64px;
  width: auto;
}

.header-logo-text {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.header-nav > a,
.header-nav > .nav-dropdown > a {
  padding: 8px 18px;
  border-radius: 5px;
  font-size: 16px;
  color: var(--text);
  transition: background var(--transition);
  white-space: nowrap;
  font-weight: 700;
}

.header-nav a:hover {
  background: #f0f2f5;
}

/* ドロップダウン */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 3px;
  cursor: pointer;
}

.nav-arrow {
  font-size: 10px;
  transition: transform var(--transition);
}

.nav-dropdown:hover .nav-arrow {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  min-width: 180px;
  z-index: 200;
}

/* hover bridge: fills the 8px gap so the mouse doesn't lose .nav-dropdown:hover */
.nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -8px;
  left: -20px;
  right: -20px;
  height: 8px;
  background: transparent;
}

.nav-dropdown:hover .nav-dropdown-menu {
  display: block;
}

.nav-dropdown-menu a {
  display: block;
  padding: 11px 18px;
  font-size: 14px;
  color: var(--text);
  border-bottom: 1px solid #f0f0f0;
  white-space: nowrap;
}

.nav-dropdown-menu a:first-child {
  border-radius: 8px 8px 0 0;
}

.nav-dropdown-menu a:last-child {
  border-bottom: none;
  border-radius: 0 0 8px 8px;
}

.nav-dropdown-menu a:only-child {
  border-radius: 8px;
}

.nav-dropdown-menu a:hover {
  background: #f5f7fa;
  color: var(--primary);
}

.nav-search {
  font-size: 15px;
}

/* ハンバーガー */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* モバイルメニュー */
.mobile-menu {
  display: none;
  flex-direction: column;
  background: #fff;
  border-bottom: 1px solid #ddd;
  overflow-y: auto;
  max-height: 0;
  transition: max-height 0.3s ease;
}

.mobile-menu.open {
  max-height: 80vh;
}

.mobile-menu > a {
  display: block;
  padding: 13px 24px;
  color: var(--text);
  font-size: 14px;
  border-bottom: 1px solid #eee;
  transition: background var(--transition);
}

.mobile-menu > a:hover { background: #f5f5f5; }

/* モバイルアコーディオン */
.mobile-acc-toggle {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: 13px 24px;
  background: none;
  border: none;
  border-bottom: 1px solid #eee;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  cursor: pointer;
  font-weight: 500;
}
.mobile-acc-toggle:hover { background: #f5f5f5; }
.mobile-acc-arrow { transition: transform 0.2s; display: inline-block; font-style: normal; }
.mobile-acc-toggle.open .mobile-acc-arrow { transform: rotate(180deg); }
.mobile-acc-list {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}
.mobile-acc-list.open { max-height: 2000px; }
.mobile-acc-list a {
  display: block;
  padding: 10px 24px 10px 38px;
  font-size: 13px;
  color: #555;
  background: #f9fafc;
  border-bottom: 1px solid #f0f0f0;
  transition: background var(--transition);
}
.mobile-acc-list a:hover { background: #eef4f4; }

/* ===== ヒーロー ===== */
.hero {
  position: relative;
  background: url('hero.jpg') center 85% / cover no-repeat;
  height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* シネマティック：暗いグラデーションオーバーレイ */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.15) 0%,
    rgba(0,0,0,0.45) 60%,
    rgba(0,0,0,0.65) 100%
  );
}

/* 下部のティールライン */
.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 10px;
  background: linear-gradient(to right, #4ab8b0, #2c5f8a, #4ab8b0);
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.hero-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.28em;
  text-shadow: 0 2px 24px rgba(0,0,0,0.5);
  white-space: nowrap;
  opacity: 0;
  filter: blur(24px);
  transform: scale(1.08);
  animation: hero-blur-in 1.4s cubic-bezier(0.22, 1, 0.36, 1) 0.3s forwards;
}

.hero-subtitle {
  font-size: clamp(0.85rem, 2vw, 1.05rem);
  color: rgba(255,255,255,0);
  letter-spacing: 0.25em;
  font-weight: 500;
  text-transform: uppercase;
  animation: hero-fade-in 0.7s ease 1.4s forwards;
}

.hero-line {
  width: 0;
  height: 2px;
  background: #4ab8b0;
  margin: 0 auto;
  animation: hero-line-expand 0.6s ease 1.3s forwards;
}

@keyframes hero-blur-in {
  from { opacity: 0; filter: blur(24px); transform: scale(1.08); }
  to   { opacity: 1; filter: blur(0);    transform: scale(1); }
}

@keyframes hero-fade-in {
  from { color: rgba(255,255,255,0); }
  to   { color: rgba(255,255,255,0.85); }
}

@keyframes hero-line-expand {
  from { width: 0; }
  to   { width: 220px; }
}

/* ===== セクション共通 ===== */
.section {
  padding: 56px 20px;
  background: var(--bg);
}

.section-alt {
  background: var(--bg-alt);
}

.section-title {
  text-align: center;
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  font-style: italic;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
  letter-spacing: 0.04em;
}

.section-subtitle {
  text-align: center;
  color: var(--text-light);
  font-size: 16px;
  margin-bottom: 28px;
}

/* ===== Jinjer ===== */
.jinjer-card {
  max-width: 720px;
  margin: 0 auto;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  overflow: hidden;
  border: 1px solid #e0e0e0;
}

.jinjer-logo-area {
  background: #f7c31a;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 170px;
  flex-shrink: 0;
}

.jinjer-badge {
  background: var(--white);
  border: 2px solid #c9960a;
  border-radius: 8px;
  padding: 6px 14px;
  font-weight: 900;
  font-size: 17px;
  color: #b8850a;
  text-align: center;
  line-height: 1.3;
}

.jinjer-badge small { font-size: 11px; display: block; font-weight: 600; }

.jinjer-time-text {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: #4a3a00;
}

.jinjer-tips {
  padding: 20px 24px;
  flex: 1;
}

.jinjer-tips-title {
  font-weight: 700;
  color: #c00;
  margin-bottom: 10px;
  font-size: 13px;
}

.jinjer-tips ul {
  list-style: disc;
  padding-left: 18px;
  font-size: 13px;
  color: var(--text);
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.jinjer-link {
  display: inline-block;
  color: #1a6abf;
  text-decoration: underline;
  font-size: 13px;
}

/* ===== News タブ ===== */
.news-tabs {
  display: flex;
  gap: 8px;
  max-width: 780px;
  margin: 0 auto 0;
  flex-wrap: wrap;
}

.news-tab {
  flex: 1;
  min-width: 140px;
  padding: 12px 16px;
  border: 2px solid #ddd;
  border-bottom: none;
  background: #eee;
  border-radius: 8px 8px 0 0;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  color: #666;
  transition: background var(--transition), color var(--transition);
  font-family: inherit;
  white-space: nowrap;
}

.news-tab:hover {
  background: #e0e0e0;
  color: var(--primary);
}

.news-tab.active {
  background: #fff;
  color: var(--primary);
  border-color: #ddd;
}

.news-panel {
  display: none;
  max-width: 780px;
  margin: 0 auto;
}

.news-panel.active {
  display: block;
}

/* ===== News ===== */
.news-list {
  max-width: 780px;
  margin: 0 auto;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid #e0e0e0;
  overflow: hidden;
}

.news-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid #eee;
  transition: background var(--transition);
  flex-wrap: wrap;
}

.news-item:last-child { border-bottom: none; }
.news-item:hover { background: #fafbfc; }

.news-loading { color: var(--text-light); font-size: 14px; padding: 16px 0; }

.news-more-link {
  display: block;
  text-align: right;
  padding: 12px 0 4px;
  font-size: 13px;
  color: var(--primary);
  font-weight: 600;
  border-top: 1px solid #eee;
  margin-top: 4px;
}
.news-more-link:hover { text-decoration: underline; }

.news-date {
  font-size: 14px;
  color: var(--text-light);
  white-space: nowrap;
  min-width: 90px;
}

.news-tag {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 3px;
  white-space: nowrap;
}

.tag-important { background: #fde8e8; color: #b00; }
.tag-info      { background: #ddeeff; color: #1a5faa; }
.tag-system    { background: #e6f4ea; color: #2a7a30; }
.tag-ranking        { background: #fff3cd; color: #856404; }
.tag-firstcontract  { background: #fff8e1; color: #b8860b; }
.tag-personnel      { background: #d1ecf1; color: #0c5460; }
.tag-move      { background: #e2d9f3; color: #4a235a; }
.tag-leave     { background: #f5c6cb; color: #721c24; }

.news-text {
  flex: 1;
  font-size: 15px;
  min-width: 140px;
}

.news-stars {
  color: var(--accent);
  font-size: 16px;
  white-space: nowrap;
  letter-spacing: -1px;
}

/* ===== グリッドカード（Guide / Teams 共通） ===== */
.grid-cards {
  max-width: 920px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 14px;
}

/* ===== Tools グリッド（3列固定、Guideと同幅） ===== */
.tools-grid {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

/* ===== Guide グリッド（PC:4列 / iPad:3列 / スマホ:3列） ===== */
.guide-grid {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 1fr;
  gap: 14px;
}

.guide-card {
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
  text-decoration: none;
  height: 100%;
}

.guide-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  filter: brightness(0.95);
}

.guide-card-soon {
  cursor: default;
  opacity: 0.75;
}
.guide-card-soon:hover {
  transform: none;
  box-shadow: none;
  filter: none;
}

.soon-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  background: rgba(0,0,0,0.35);
  border-radius: 4px;
  padding: 1px 6px;
  vertical-align: middle;
  margin-left: 4px;
  letter-spacing: 0.02em;
}

.guide-text {
  flex: 1;
}

.guide-title {
  font-size: 20px;
  font-weight: 700;
  color: #2a2a2a;
  margin-bottom: 6px;
  line-height: 1.4;
}

.guide-desc {
  font-size: 14px;
  color: #444;
  line-height: 1.6;
}

.guide-text-block {
  border-radius: 12px;
  padding: 18px 20px;
  background: #f0f0f0;
  height: 100%;
}

.anzen-list {
  list-style: decimal;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.anzen-list li {
  font-size: 11px;
  color: #444;
  line-height: 1.5;
}

.card-guide .card-desc {
  font-size: 10px;
  color: var(--text-light);
  line-height: 1.4;
}

/* ===== Teams グリッド（PC:4列 / iPad:3列 / スマホ:3列） ===== */
.teams-grid {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  align-items: stretch;
}

.team-card {
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
  text-decoration: none;
  min-height: 100px;
}

.team-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  filter: brightness(0.95);
}

.team-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255,255,255,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.team-icon svg {
  width: 32px;
  height: 32px;
  stroke: #3a3a3a;
  stroke-width: 1.5;
  fill: none;
}

.team-label {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  color: #2a2a2a;
}

/* Teams カラー（元サイトに合わせたパステル） */
.card-purple  { background: #c9b3d9; }
.card-teal    { background: #7ececa; }
.card-lime    { background: #a8d4a0; }
.card-yellow  { background: #e8d870; }
.card-amber   { background: #d4a860; }
.card-red     { background: #d88878; }
.card-pink    { background: #e8b0a8; }
.card-beige   { background: #d4c4a8; }
.card-gray    { background: #b8b8b8; }
.card-lavender{ background: #88b4e8; } /* スカイブルー */
.card-cyan    { background: #e888b8; } /* ローズ */
.card-sage    { background: #e8a868; } /* オレンジ */

/* ===== About Us ===== */
.about-inner {
  max-width: 900px;
  margin: 0 auto;
}

.philosophy-headline {
  font-size: 22px;
  font-weight: 900;
  text-align: center;
  margin-bottom: 28px;
  color: #222;
  letter-spacing: 0.02em;
}

.pyramid-wrapper {
  display: flex;
  gap: 48px;
  align-items: center;
  overflow: visible;
}

.pyramid {
  flex-shrink: 0;
  width: 320px;
  overflow: visible;
  padding-top: 8px;
}

.pyramid-texts {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pyramid-text {
  font-size: 15px;
  line-height: 1.9;
  color: #444;
  padding: 0;
  border: none;
  background: none;
}

.mvvc-heading {
  font-weight: 700;
  color: #2a8a88;
  margin-bottom: 4px;
  font-size: 15px;
}

/* ===== Five-Year Plan ===== */
.fiveyear-content {
  max-width: 720px;
  margin: 0 auto;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid #e0e0e0;
  padding: 32px;
  display: flex;
  gap: 32px;
  align-items: center;
}

.fiveyear-goal { flex: 1; }

.goal-badge {
  display: inline-block;
  background: #e53935;
  color: var(--white);
  font-size: 1.8rem;
  font-weight: 900;
  padding: 8px 18px;
  border-radius: 6px;
  margin-bottom: 12px;
}

.goal-text {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.goal-sub {
  font-size: 12px;
  color: var(--text-light);
}

.fiveyear-chart { flex: 1; }

.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 130px;
  padding: 0 6px;
  border-left: 2px solid #bbb;
  border-bottom: 2px solid #bbb;
}

.bar-group { flex: 1; display: flex; flex-direction: column; align-items: center; }

.bar {
  width: 100%;
  background: #5b8ec4;
  border-radius: 3px 3px 0 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 3px;
}

.bar span {
  font-size: 9px;
  color: var(--white);
  text-align: center;
  line-height: 1.2;
}

.bar-highlight { background: #e53935; }

.chart-arrow {
  font-size: 10px;
  color: var(--text-light);
  margin-top: 6px;
  text-align: center;
}

/* ===== フッター ===== */
.footer {
  background: #e8eaed;
  color: #333;
  padding: 48px 40px 0;
}

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 32px;
  padding-bottom: 40px;
}

.footer-col h4 {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
  color: #111;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
  list-style: disc;
  padding-left: 18px;
}

.footer-col a {
  font-size: 15px;
  color: #444;
  transition: color var(--transition);
}

.footer-col a:hover { color: #111; }

.footer-bottom {
  border-top: 1px solid #ccc;
  padding: 16px 0;
  text-align: center;
  font-size: 13px;
  color: #888;
}

/* ===== ニュースモーダル ===== */
.news-item {
  cursor: pointer;
}
.news-item:hover {
  background: #f0f6ff;
}

.news-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
}

.news-modal-overlay.open {
  display: flex;
}

.news-modal {
  background: #fff;
  border-radius: 18px;
  width: 100%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  position: relative;
  animation: modal-in 0.25s cubic-bezier(0.22,1,0.36,1);
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}

.news-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #f0f2f5;
  color: #666;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  z-index: 1;
}
.news-modal-close:hover { background: #e0e0e0; }

.news-modal-header {
  background: linear-gradient(135deg, #1a3a5c, #2a8a88);
  color: #fff;
  padding: 28px 28px 24px;
  border-radius: 18px 18px 0 0;
}

.news-modal-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.news-modal-date {
  font-size: 13px;
  color: rgba(255,255,255,0.8);
}

.news-modal-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.5;
  color: #fff;
}

.news-modal-body {
  padding: 24px 28px 28px;
  font-size: 15px;
  line-height: 2;
  color: #333;
  white-space: pre-wrap;
}

/* ===== ニュースモーダル内アコーディオン ===== */
.news-modal-body .accordion-item { border: 1px solid #dce3ea; border-radius: 8px; margin-bottom: 8px; overflow: hidden; }
.news-modal-body .accordion-btn {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; background: #f4f8fb; border: none; cursor: pointer;
  font-size: 15px; font-weight: 700; color: #1a3a5c; text-align: left;
}
.news-modal-body .accordion-btn:hover { background: #eaf4f4; }
.news-modal-body .accordion-btn.open { background: #eaf4f4; }
.news-modal-body .accordion-chevron { font-size: 13px; transition: transform 0.2s; }
.news-modal-body .accordion-btn.open .accordion-chevron { transform: rotate(180deg); display: inline-block; }
.news-modal-body .accordion-content { display: none; padding: 14px 16px; font-size: 14px; line-height: 1.9; }
.news-modal-body .accordion-content.open { display: block; }
.news-modal-body .accordion-content p { margin-bottom: 0.8em; }
.news-modal-body .accordion-content img { max-width: 100%; border-radius: 8px; margin: 8px 0; display: block; }

/* 初契約速報：最初の画像を左フロート */
.news-modal-body.fc-body {
  white-space: normal;
  overflow: hidden;
}
.news-modal-body.fc-body img:first-of-type {
  float: left;
  max-width: 260px;
  width: 40%;
  margin: 0 24px 16px 0;
  border-radius: 8px;
  display: block;
}
.news-modal-body.fc-body::after {
  content: '';
  display: table;
  clear: both;
}
@media (max-width: 600px) {
  .news-modal-body.fc-body img:first-of-type {
    float: none;
    width: 100%;
    max-width: 100%;
    margin: 0 0 16px 0;
  }
}

/* ===== レスポンシブ ===== */

@media (max-width: 900px) {
  .pyramid-wrapper { flex-direction: column; align-items: center; }
  .fiveyear-content { flex-direction: column; align-items: stretch; }
}

/* タブレット（641px〜900px）：ナビを小さく省略表示 */
@media (max-width: 900px) and (min-width: 641px) {
  .header-inner { padding: 0 20px; }
  .header-logo img { height: 48px; }
  .header-nav > a,
  .header-nav > .nav-dropdown > a { padding: 6px 10px; font-size: 12px; }
  .nav-dropdown-menu { min-width: 150px; }
  .header-nav > a:first-child { display: none; } /* ホームは省略 */
}

/* iPad（641px〜1024px）：グリッド3列 */
@media (max-width: 1024px) and (min-width: 641px) {
  .guide-grid { grid-template-columns: repeat(3, 1fr); }
  .teams-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 640px) {
  .header-nav { display: none; }
  .hamburger { display: flex; margin-left: auto; }
  .header-inner { padding: 0 16px; justify-content: flex-start; }
  .header-logo img { height: 48px; }

  /* モバイルは sticky より確実な fixed を使用 */
  .header { position: fixed; left: 0; right: 0; }
  .mobile-menu { display: flex; position: fixed; top: 72px; left: 0; right: 0; z-index: 99; }
  body { padding-top: 72px; }

  .section { padding: 36px 14px; }
  .hero { height: 220px; }

  .news-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .news-tab {
    min-width: unset;
    font-size: 12px;
    padding: 10px 6px;
    white-space: nowrap;
  }

  .news-item {
    display: grid;
    grid-template-columns: auto auto 1fr auto;
    grid-template-areas:
      "date tag  .     ."
      "text text text  stars";
    gap: 4px 8px;
    align-items: center;
  }

  .news-date  { grid-area: date; }
  .news-tag   { grid-area: tag; }
  .news-text  { grid-area: text; font-size: 14px; }
  .news-stars { grid-area: stars; }

  .hero-title {
    font-size: clamp(1.5rem, 9vw, 2.6rem);
    letter-spacing: 0.12em;
  }

  .hero-line {
    animation: hero-line-expand 0.6s ease 1.3s forwards;
  }

  @keyframes hero-line-expand {
    from { width: 0; }
    to   { width: 120px; }
  }

  .jinjer-card { flex-direction: column; }
  .jinjer-logo-area {
    flex-direction: row;
    min-width: unset;
    padding: 14px 18px;
  }

  .grid-cards {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  .tools-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .guide-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .guide-card {
    flex-direction: column;
    align-items: center;
    padding: 12px 6px;
    gap: 6px;
    text-align: center;
  }

  .guide-text { text-align: center; }
  .guide-title { font-size: 11px; line-height: 1.3; }
  .guide-desc { display: none; }

  .teams-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .team-card {
    flex-direction: column;
    align-items: center;
    padding: 12px 6px;
    gap: 6px;
    min-height: auto;
    text-align: center;
  }

  .team-label { font-size: 11px; line-height: 1.3; }

  .team-icon {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }

  .team-icon svg {
    width: 22px;
    height: 22px;
  }

  .team-label { font-size: 12px; }

  .card-guide { padding: 12px 8px 10px; }
  .card-guide .card-icon { width: 40px; height: 40px; font-size: 1.3rem; }
  .card-guide .card-label { font-size: 11px; }
  .card-guide .card-desc { display: none; }

  .card-team { padding: 14px 8px 12px; }
  .card-team .card-icon { font-size: 1.5rem; }
  .card-team .card-label { font-size: 11px; }

  .about-philosophy { padding: 18px 14px; }
  .pyramid { min-width: unset; width: 100%; max-width: 260px; margin: 0 auto; }
  .pyramid-text span { white-space: normal !important; }
  .row-mission { width: 60px; }
  .row-vision  { width: 92px; }
  .row-value   { width: 124px; }
  .row-credo   { width: 156px; }

  .fiveyear-content { padding: 18px 14px; }

  .footer { display: none; }
}

@media (max-width: 400px) {
  .grid-cards { grid-template-columns: repeat(2, 1fr); }
}

/* ===== キーワード検索（インライン型） ===== */
.nav-search {
  cursor: pointer;
  font-size: 18px;
  padding: 6px 10px;
  border-radius: 6px;
  transition: background var(--transition);
  user-select: none;
  text-decoration: none;
  color: inherit;
}
.nav-search:hover { background: #f0f2f5; }

/* モバイル用検索ボタン（ハンバーガーの右） */
.mobile-search-btn {
  display: none;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 6px;
  line-height: 1;
  transition: background var(--transition);
  order: 10;
  -webkit-tap-highlight-color: rgba(0,0,0,0);
  touch-action: manipulation;
  -webkit-appearance: none;
  appearance: none;
}
.mobile-search-btn:hover { background: #f0f2f5; }

@media (max-width: 640px) {
  .mobile-search-btn { display: flex; align-items: center; }
}

/* ヘッダー内に展開されるサーチバー */
#searchBar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 72px;
  background: #fff;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  border-bottom: 2px solid #4ab8b0;
}
#searchBar.open { display: flex; }

/* サーチバーの内側コンテナ（中央寄せ・最大幅） */
#searchBarInner {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(680px, calc(100% - 48px));
}

.search-bar-icon { font-size: 20px; flex-shrink: 0; color: #4ab8b0; }

#searchBarInput {
  flex: 1;
  border: none;
  outline: none;
  font-size: 16px;
  font-family: inherit;
  color: #222;
  background: transparent;
  min-width: 0;
}
#searchBarInput::placeholder { color: #aaa; }

#searchBarClose {
  background: #f0f2f5;
  border: none;
  border-radius: 6px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 14px;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background var(--transition);
}
#searchBarClose:hover { background: #dde0e4; color: #222; }

/* ヘッダー直下に出るドロップダウン */
#searchDropdown {
  display: none;
  position: fixed;
  top: 72px;
  left: 0; right: 0;
  background: #fff;
  border-bottom: 1px solid #e8eaed;
  box-shadow: 0 8px 24px rgba(0,0,0,0.13);
  z-index: 999;
  max-height: 60vh;
  overflow-y: auto;
}
#searchDropdown.open { display: block; }


.search-count {
  font-size: 12px;
  color: #888;
  padding: 10px 24px 6px;
}

.search-empty {
  font-size: 14px;
  color: #aaa;
  padding: 28px 24px;
  text-align: center;
}

.search-result-item {
  display: block;
  padding: 12px 24px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid #f0f2f5;
  transition: background var(--transition);
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: #f0faf9; }

.search-result-bc {
  font-size: 11px;
  color: #4ab8b0;
  font-weight: 700;
  margin-bottom: 3px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.search-result-title {
  font-size: 15px;
  font-weight: 700;
  color: #1a3a5c;
  margin-bottom: 4px;
}

.search-result-snip {
  font-size: 13px;
  color: #555;
  line-height: 1.6;
}

.search-result-item mark {
  background: #fff3a0;
  color: inherit;
  border-radius: 2px;
  padding: 0 1px;
}

@media (max-width: 640px) {
  #searchBarInner { width: calc(100% - 24px); gap: 8px; }
  #searchBarInput { font-size: 15px; }
  #searchDropdown { max-height: 70vh; }
}
