/* =========================================
   富里市シルバー人材センター styles.css
   ブレークポイント：768px（SP ⇔ PC）
   MUD（メディア・ユニバーサルデザイン）準拠
   ========================================= */

:root {
  --text:   #111;
  --sub:    #444;
  --bg:     #f6f4ee;
  --line:   #e2dfd6;
  --accent: #0b5aa6;
  --card:   #fbfaf7;

  /* SP用ヘッダー高さ */
  --barH-sp: 85px;
  /* PC用ヘッダー高さ（2行ナビ対応） */
  --barH-pc: 110px;
}

/* =========================================
   リセット・ベース
   ========================================= */
* { box-sizing: border-box; }

body {
  margin: 0;
  /* MUD：日本語ゴシック体を明示指定 */
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Meiryo", sans-serif;
  color: var(--text);
  background: var(--bg);
  /* デフォルト（SP）のpadding-top */
  padding-top: var(--barH-sp);
  font-size: 16px;
  line-height: 1.7;
}

a { color: inherit; text-decoration: none; }

/* =========================================
   SP/PC 表示切り替えクラス
   ========================================= */

/* SP（〜767px）のみ表示 */
.spOnly  { display: block; }

/* PC（768px〜）のみ表示 */
.pcOnly  { display: none; }

/* SPヘッダー：表示 / PCヘッダー：非表示 */
.spHeader { display: block; }
.pcHeader { display: none; }

/* =========================================
   共通コンテンツ幅・セクション
   ========================================= */
.wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 12px 16px 20px;
}

section {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

/* MUD：見出しは左アクセントバー＋大きめサイズ */
h2 {
  font-size: 22px;
  border-left: 6px solid var(--accent);
  padding-left: 12px;
  margin: 0 0 10px 0;
  line-height: 1.4;
}

.meta {
  font-size: 16px;
  margin: 10px 0;
  line-height: 1.7;
}

/* =========================================
   固定ヘッダー 共通ベース
   ========================================= */
.fixedHeader {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2000;
  background: #fff;
  border-bottom: 3px solid var(--accent);
}

.fixedHeaderInner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 12px;
}

/* =========================================
   SP用ヘッダー（〜767px）
   ========================================= */
.spHeader {
  height: var(--barH-sp);
}

.fixedLogo {
  height: 52px;
  width: auto;
  flex-shrink: 0;
}

/* SP右側アイコン2ボタン */
.headerRight {
  display: flex;
  align-items: center;
  gap: 15px;
  height: 100%;
}

.hIconBtn {
  background: transparent;
  border: none;
  padding: 0 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  text-decoration: none;
  height: 100%;
  font-family: inherit;
}

.hIconImg {
  height: 32px;
  width: auto;
  margin-bottom: 4px;
  display: block;
}

.hIconText {
  font-size: 13px;
  font-weight: 900;
  line-height: 1.1;
}

/* =========================================
   PC用ヘッダー（768px〜）
   ========================================= */
.pcHeader {
  height: var(--barH-pc);
}

/* 2行×4列ナビグリッド */
.headerNavGrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  flex: 1;
}

/* MUD：ナビボタン十分な高さ・大きめフォント */
.navBtn {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 7px 4px;
  background: #ffffff;
  border: 1.5px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
  font-weight: bold;
  color: var(--accent);
  line-height: 1.2;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, color 0.15s;
  min-height: 40px;
  text-decoration: none;
}

.navBtn:hover,
.navBtn:focus {
  background: var(--accent);
  color: #fff;
}

/* =========================================
   ヒーロー
   ========================================= */
.heroSection { padding-bottom: 15px; }

.heroContainer {
  position: relative;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  line-height: 0;
}

.heroImg { width: 100%; height: auto; display: block; }

.heroOverlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  background: rgba(0, 0, 0, 0.6);
  padding: 10px;
  text-align: center;
  line-height: 1.5;
}

/* MUD：キャッチコピー白抜き・太字・大きめ */
.catch {
  font-size: 18px;
  font-weight: 900;
  color: #fff !important;
  margin: 0;
  text-shadow: 0 1px 3px rgba(0,0,0,0.7);
}

/* =========================================
   カード
   ========================================= */
.cards {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.card {
  min-height: 57px;
  height: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  background: var(--card);
  text-align: left;
  line-height: 1.6;
}

/* MUD：カード内テキスト16px以上 */
.card h3 { margin: 0 0 4px 0; font-size: 16px; font-weight: bold; color: var(--accent); }
.card p  { margin: 0; font-size: 16px; color: var(--sub); }

/* =========================================
   リスト・その他
   ========================================= */
.newsList { list-style: none; padding: 0; margin: 0; }
.newsList li {
  border-bottom: 1px solid var(--line);
  padding: 7px 0;
  font-size: 16px;
}
.newsDate { color: var(--sub); font-size: 14px; margin-right: 8px; }
.mapImg { width: 100%; border-radius: 12px; }
.note { text-align: right; font-size: 14px; margin: 6px 0 0; }
.note a { text-decoration: underline; color: var(--accent); font-weight: bold; }

/* =========================================
   固定フッターバー（SP・PC共通）
   ========================================= */
.stickyBar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2000;
  background: #fff;
  border-top: 3px solid var(--accent);
}

/* SP：3列（電話 50% | 時間 残り | トップへ 60px） */
.stickyInner {
  display: grid;
  grid-template-columns: 50% 1fr 60px;
  gap: 2px;
  padding: 6px;
  max-width: 960px;
  margin: 0 auto;
  height: 85px;
}

.stickyTel, .stickyCard {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: 6px;
  font-weight: 900;
  font-size: 13px;
}

.stickyTel { background: var(--accent); color: #fff !important; }
.stickyCard { border: 1px solid var(--line); background: var(--card); }

.stickyCopy {
  background: #f1f1f1;
  text-align: center;
  font-size: 11px;
  padding: 4px 0;
  border-top: 1px solid var(--line);
}

/* 電話エリア */
.stickyTel.wideArea { line-height: 1.1; }
.telLabel { font-size: 10px; font-weight: normal; opacity: 0.85; display: none; } /* PC時に表示 */
.telNum   { font-size: 20px; font-weight: 900; display: block; letter-spacing: -0.05em; }
.telSub   { font-size: 10px; font-weight: normal; opacity: 0.9; }

/* 受付時間エリア */
.infoArea { background: #fff; color: var(--text); line-height: 1.1; overflow: hidden; }
.timeLabel { font-size: 10px; font-weight: normal; color: var(--sub); display: none; } /* PC時に表示 */
.timeNum   { font-size: 20px; font-weight: 900; display: block; white-space: nowrap; letter-spacing: -0.08em; transform: scaleX(0.95); transform-origin: left; }
.timeSub   { font-size: 10px; display: block; margin-top: 2px; }

/* 所在地ボタン（PC専用：SP時は非表示） */
.pcFooterOnly { display: none; }
.mapArea { background: var(--card); color: var(--accent); text-decoration: none; cursor: pointer; }
.mapIcon { font-size: 20px; line-height: 1; margin-bottom: 2px; display: block; }
.mapText { font-size: 11px; font-weight: 900; white-space: nowrap; }

/* トップへ */
.topArea { background: #eee; color: var(--sub); text-decoration: none; cursor: pointer; display: flex; flex-direction: column; justify-content: center; padding: 0; }
.topIcon { font-size: 14px; line-height: 1; color: var(--accent); margin-bottom: 2px; }
.topText { font-size: 10px; font-weight: 900; white-space: nowrap; transform: scale(0.9); }

/* =========================================
   セクション背景
   ========================================= */
.bg-white {
  background-color: var(--bg);
  margin-left: -16px;
  margin-right: -16px;
  padding-left: 16px;
  padding-right: 16px;
}

/* =========================================
   メインフッター
   ========================================= */
.mainFooter {
  background: #444;
  color: #fff;
  padding: 40px 16px;
  margin-bottom: 100px;
}

.footerInner {
  max-width: 960px;
  margin: 0 auto;
  display: grid;
  gap: 30px;
}

.footerLogo {
  height: 50px;
  filter: brightness(0) invert(1);
  margin-bottom: 15px;
}

.footerTel { font-size: 20px; font-weight: bold; margin-top: 10px; }

.fLinkList { list-style: none; padding: 0; }
.fLinkList li {
  margin-bottom: 10px;
  border-bottom: 1px solid #666;
  padding-bottom: 5px;
  font-size: 16px;
}
.fLinkList a::before { content: "▶"; font-size: 10px; margin-right: 8px; }

/* =========================================
   オーバーレイ共通
   ========================================= */
.overlayMenu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 3000;
  display: none;
  align-items: center;
  justify-content: center;
}

.overlayMenu.active {
  display: flex;
  animation: fadeIn 0.25s ease;
}

.overlayPanel {
  width: 90%;
  max-height: 90vh;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.menuHeader {
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 3px solid var(--accent);
  padding: 15px 20px;
  background: #fff;
}

.overlayScrollBody {
  flex: 1;
  overflow-y: auto;
  padding: 20px 16px 40px;
}

/* MUD：タイトル大きめ・太字 */
.menuTitle { font-size: 20px; font-weight: bold; color: var(--accent); }

.closeBtn {
  font-size: 16px;
  background: #333;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 10px 18px;
  cursor: pointer;
  font-family: inherit;
  font-weight: bold;
  min-height: 44px;
}
.closeBtn:hover { background: #555; }

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* =========================================
   サブパネル（重なり表示）
   よくある質問などの上に少しずれて重なる
   ========================================= */
.subPanel {
  display: none;
  position: fixed;
  /* overlayMenu(z-index:3000)より上、ずれた位置に配置 */
  z-index: 3100;
  /* 上下左右をオフセットして「少しずれて重なる」表現 */
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  /* 背景は透明（下のオーバーレイが透けて見える） */
  pointer-events: none;
}

.subPanel.active {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.subPanelInner {
  /* PDFどおり右上にずらす */
  position: relative;
  top: 30px;
  left: 30px;
  width: 90%;
  max-width: 500px;
  max-height: 85vh;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  pointer-events: auto;   /* パネル本体はクリック可能に戻す */
  border: 2px solid var(--accent);
}


/* =========================================
   セクションヘッダー共通レイアウト（PDF準拠）
   タイトル＋説明文（左）＋イラスト（右上）
   flow / jobs / faq 共通
   ========================================= */
.faqHeader {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.faqHeaderText {
  flex: 1;
}

.faqHeaderText h2 {
  margin: 0 0 8px 0;
}

.faqHeaderText .meta {
  margin: 0;
}

/* 高さ固定で3つのイラストを統一 / 幅はアスペクト比に従う */
.faqIllust {
  height: 120px;
  width: auto;
  flex-shrink: 0;
  display: block;
}

/* =========================================
   PC（768px以上）レスポンシブ切り替え
   ========================================= */
@media (min-width: 768px) {

  /* body：PCヘッダー高さ分のpadding */
  body { padding-top: var(--barH-pc); }

  /* ヘッダー切り替え */
  .spHeader { display: none !important; }
  .pcHeader { display: block !important; }

  /* コンテンツ切り替え */
  .spOnly { display: none !important; }
  .pcOnly { display: block !important; }

  /* PCロゴ少し大きく */
  .fixedLogo { height: 60px; }

  /* PCナビボタン少し大きく */
  .navBtn { font-size: 14px; min-height: 44px; }

  /* カードを3列に */
  .cards { grid-template-columns: 1fr 1fr 1fr; }

  /* キャッチコピー大きく */
  .catch { font-size: 28px; }

  /* ------------------------------------------------
     PC固定フッター：8分割グリッド
     3/8 電話 | 3/8 受付時間 | 1/8 所在地 | 1/8 トップへ
     ------------------------------------------------ */
  .stickyInner {
    grid-template-columns: 3fr 3fr 1fr 1fr;
  }

  /* 所在地ボタン：PC時に表示 */
  .pcFooterOnly { display: flex; }

  /* 電話：ラベル表示・文字調整 */
  .telLabel { display: block; }
  .telNum   { font-size: 22px; letter-spacing: -0.03em; }
  .telSub   { font-size: 12px; }

  /* 受付時間：ラベル表示・文字調整 */
  .timeLabel { display: block; }
  .timeNum   { font-size: 22px; transform: scaleX(1); letter-spacing: normal; }
  .timeSub   { font-size: 12px; }

  /* 所在地・トップへ：文字サイズ統一 */
  .mapText  { font-size: 12px; }
  .topText  { font-size: 12px; transform: scale(1); }
  .topIcon  { font-size: 16px; }

  .stickyTel, .stickyCard { font-size: 14px; }

  /* メインフッター2列 */
  .footerInner { grid-template-columns: 1fr 1fr; }

  /* オーバーレイ幅を広げる */
  .overlayPanel { width: 540px; }
}

/* =========================================
   大画面（1024px以上）追加調整
   ========================================= */
@media (min-width: 1024px) {
  .navBtn { font-size: 15px; }
  .catch  { font-size: 32px; }
}

/* =========================================
   MUD追加対策
   ========================================= */

/* フォーカスリングを明確に（キーボード・支援技術対応） */
a:focus-visible,
button:focus-visible {
  outline: 3px solid #ff8c00;
  outline-offset: 2px;
}

/* オーバーレイ内リンクは下線で識別 */
.overlayScrollBody a { text-decoration: underline; }
/* ただしボタン型は不要 */
.overlayScrollBody a[style*="background"] { text-decoration: none; }

/* 選択色をアクセントカラーと統一 */
::selection { background: #0b5aa6; color: #fff; }
