/*
Theme Name: Mentalnet 2026
Theme URI: https://www.mentalnet.jp/
Author: アビモ株式会社
Description: 社会福祉法人メンタルネット 公式サイトテーマ（2026年リニューアル）
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: mentalnet2026
*/

html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Noto Sans JP", sans-serif;
  color: #24302B;
  background: #FFFFFF;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
}
a { color: #268F44; }
a:hover { color: #1F5C38; }
img { max-width: 100%; height: auto; }

/* ===== ヘッダーナビ（PCドロップダウン＝CSS hover） ===== */
.mn-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px clamp(16px, 3vw, 32px);
  border-bottom: 1px solid #E1E9E5;
  position: sticky; top: 0;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(6px);
  z-index: 100;
}
body.admin-bar .mn-header { top: 32px; }
.mn-nav { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.mn-nav-item { position: relative; }
.mn-navlink {
  display: block; padding: 10px 16px; font-weight: 500; font-size: 15px;
  border-radius: 6px; text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
  background: transparent; color: #24302B; white-space: nowrap;
}
.mn-nav-item:hover .mn-navlink, .mn-navlink.is-active { background: #F4F8F6; color: #268F44; }
.mn-dd { display: none; position: absolute; top: 100%; left: 0; padding-top: 6px; z-index: 20; }
.mn-nav-item:hover .mn-dd { display: block; }
.mn-nav-item.mn-dd-right .mn-dd { left: auto; right: 0; }
.mn-dd-inner {
  margin: 0; padding: 8px; min-width: 260px; background: #FFFFFF;
  border: 1px solid #E1E9E5; border-radius: 10px;
  box-shadow: 0 12px 28px rgba(0,32,96,0.08);
  display: flex; flex-direction: column;
}
.mn-dd-link {
  display: block; padding: 9px 12px; font-size: 14px; border-radius: 6px;
  color: #24302B; text-decoration: none; line-height: 1.7;
}
.mn-dd-link:hover { background: #F4F8F6; color: #268F44; }

/* ハンバーガー・ドロワー（〜820px） */
.mn-menu-btn {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 48px; height: 48px; padding: 12px;
  background: transparent; border: 1px solid #E1E9E5; border-radius: 10px; cursor: pointer;
}
.mn-menu-btn span { display: block; width: 22px; height: 2px; background: #1F5C38; border-radius: 2px; transition: all 0.2s ease; }
body.mn-menu-open .mn-menu-btn span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.mn-menu-open .mn-menu-btn span:nth-child(2) { opacity: 0; transform: scaleX(0); }
body.mn-menu-open .mn-menu-btn span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.mn-overlay { display: none; position: fixed; inset: 0; background: rgba(31,92,56,0.25); z-index: 98; }
.mn-drawer {
  display: none; position: fixed; top: 0; right: 0; bottom: 0; width: min(320px, 85vw);
  background: #FFFFFF; z-index: 99; padding: 84px 20px 24px; overflow-y: auto;
  box-shadow: -12px 0 32px rgba(0,32,96,0.12);
  flex-direction: column; gap: 4px;
}
body.mn-menu-open .mn-overlay { display: block; }
body.mn-menu-open .mn-drawer { display: flex; }
.mn-drawer-parent {
  display: block; padding: 13px 12px; font-weight: 700; font-size: 16px;
  color: #1F5C38; text-decoration: none; border-bottom: 1px solid #F4F8F6;
}
.mn-drawer-child { display: block; padding: 10px 12px 10px 24px; font-size: 14px; color: #3A453F; text-decoration: none; }
.mn-drawer-child:hover { color: #268F44; }
@media (max-width: 820px) {
  .mn-nav { display: none; }
  .mn-menu-btn { display: flex; }
}

/* 求人フローティングボタン */
.mn-recruit {
  position: fixed; right: 24px; top: 32vh; z-index: 97;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  background: #268F44; color: #FFFFFF; text-decoration: none;
  font-size: 16px; font-weight: 700;
  padding: 18px 16px 28px; border-radius: 32px;
  box-shadow: 0 8px 24px rgba(31,92,56,0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.mn-recruit:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(31,92,56,0.45); color: #FFFFFF; }
.mn-recruit-text { writing-mode: vertical-rl; min-height: 160px; display: flex; align-items: center; justify-content: center; }
@media (max-width: 820px) {
  .mn-recruit { right: 12px; gap: 10px; font-size: 13px; padding: 12px 10px 18px; border-radius: 24px; }
  .mn-recruit-text { min-height: 110px; }
}

/* ===== リンク系 hover ===== */
.mn-news-link { color: #24302B; text-decoration: none; }
.mn-news-link:hover { color: #268F44; }
.mn-row-link { display: block; padding: 20px 4px; border-bottom: 1px solid #E1E9E5; text-decoration: none; color: #24302B; }
.mn-row-link:hover { background: #F4F8F6; }
.mn-row-flex { display: flex; gap: 18px; align-items: flex-start; }
.mn-row-thumb {
  width: 148px; height: 100px; flex-shrink: 0; border-radius: 8px;
  object-fit: cover; background: #F4F8F6; display: block;
}
.mn-row-body { min-width: 0; flex: 1; }
@media (max-width: 560px) {
  .mn-row-thumb { width: 104px; height: 74px; }
}
.mn-single-hero {
  width: 100%; height: clamp(220px, 42vw, 400px);
  object-fit: cover; border-radius: 14px; display: block; margin-bottom: 32px;
  background: #F4F8F6;
}
.mn-card {
  border: 1px solid #E1E9E5; border-radius: 12px; padding: 20px 22px; background: #FFFFFF;
  transition: box-shadow 0.15s ease, transform 0.15s ease; text-decoration: none; color: #24302B; display: block;
}
.mn-card:hover { box-shadow: 0 10px 24px rgba(0,32,96,0.08); transform: translateY(-2px); }
.mn-facility-card {
  border: 1px solid #E1E9E5; border-radius: 12px; padding: 14px 14px 20px; background: #FFFFFF;
  transition: box-shadow 0.15s ease, transform 0.15s ease; text-decoration: none; color: #24302B; display: block;
}
.mn-facility-card:hover { box-shadow: 0 10px 24px rgba(0,32,96,0.08); transform: translateY(-2px); }
.mn-chip {
  display: inline-block; font-size: 13px; padding: 8px 18px; border-radius: 20px;
  background: #FFFFFF; border: 1px solid #E1E9E5; color: #24302B; text-decoration: none;
}
.mn-chip:hover { border-color: #268F44; color: #268F44; }
.mn-footer-jobs {
  display: inline-block; margin-top: 14px; font-size: 13px;
  border: 1px solid rgba(255,255,255,0.4); padding: 8px 16px; border-radius: 20px;
  color: #F3FBF8; text-decoration: none;
}
.mn-footer-jobs:hover { background: rgba(255,255,255,0.08); color: #F3FBF8; }

/* 施設・設備ギャラリー */
.mn-gallery-item {
  display: block; overflow: hidden; border-radius: 10px; border: 1px solid #E1E9E5; background: #F4F8F6;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.mn-gallery-item img { display: block; width: 100%; height: 165px; object-fit: cover; }
.mn-gallery-item:hover { box-shadow: 0 8px 20px rgba(0,32,96,0.12); transform: translateY(-2px); }

/* パンフレット（表面サムネイル → PDF） */
.mn-pamphlet {
  display: inline-block; max-width: 560px; width: 100%;
  border: 1px solid #E1E9E5; border-radius: 12px; padding: 10px;
  background: #FFFFFF; text-decoration: none; color: #24302B;
  transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}
.mn-pamphlet:hover { box-shadow: 0 10px 24px rgba(0,32,96,0.12); transform: translateY(-2px); border-color: #268F44; }
.mn-pamphlet img { display: block; width: 100%; height: auto; border-radius: 6px; }
.mn-pamphlet-label {
  display: block; text-align: center; margin-top: 10px; padding: 8px 16px;
  font-size: 14px; font-weight: 700; color: #FFFFFF; background: #268F44; border-radius: 20px;
}
.mn-pamphlet:hover .mn-pamphlet-label { background: #1F5C38; }

/* 写真プレースホルダ（写真支給までの仮枠） */
.mn-photo-ph {
  width: 100%; height: 100%; min-height: 120px;
  display: flex; align-items: center; justify-content: center;
  background: #F4F8F6; border: 1px dashed #C9D6D0; border-radius: 8px;
  color: #9AA6A0; font-size: 12px;
}

/* ===== 投稿本文（single） ===== */
.mn-entry { max-width: 820px; margin: 0 auto; }
.mn-entry img { border-radius: 8px; }
.mn-entry h2, .mn-entry h3 { font-family: "Zen Maru Gothic", sans-serif; color: #1F5C38; }
.mn-entry a { word-break: break-all; }

/* ページネーション */
.mn-pagination { margin-top: 36px; text-align: center; }
.mn-pagination .nav-links { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.mn-pagination .page-numbers {
  display: inline-block; min-width: 40px; padding: 8px 12px; border-radius: 8px;
  border: 1px solid #E1E9E5; color: #24302B; text-decoration: none; font-size: 14px; line-height: 1.4;
}
.mn-pagination .page-numbers.current { background: #268F44; border-color: #268F44; color: #FFFFFF; }
.mn-pagination .page-numbers:hover:not(.current) { border-color: #268F44; color: #268F44; }

/* ===== Contact Form 7 ===== */
.mn-cf7 .wpcf7-form { max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.mn-cf7 label { font-size: 14px; font-weight: 500; color: #1F5C38; display: block; }
.mn-cf7 .wpcf7-form-control-wrap { display: block; margin-top: 6px; }
.mn-cf7 input[type="text"], .mn-cf7 input[type="email"], .mn-cf7 textarea {
  width: 100%; box-sizing: border-box; padding: 12px 14px;
  border: 1px solid #E1E9E5; border-radius: 8px; font-family: inherit; font-size: 14px;
}
.mn-cf7 textarea { resize: vertical; }
.mn-cf7 .wpcf7-submit {
  display: block; margin: 8px auto 0; padding: 12px 40px;
  background: #268F44; color: #FFFFFF; border: none; border-radius: 24px;
  font-size: 15px; font-weight: 700; cursor: pointer; font-family: inherit;
}
.mn-cf7 .wpcf7-submit:hover { background: #1F5C38; }
.mn-cf7 .wpcf7-not-valid-tip { color: #C0392B; font-size: 12px; }
.mn-cf7 .wpcf7-response-output { border-radius: 8px; font-size: 14px; margin: 16px 0 0; padding: 10px 14px; }

/* 拠点詳細スペック表・レスポンシブ */
.mn-spec { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 24px; }
.mn-spec th {
  width: 160px; text-align: left; padding: 14px; background: #F4F8F6;
  border: 1px solid #E1E9E5; font-weight: 700; color: #1F5C38; vertical-align: top;
}
.mn-spec td { padding: 14px; border: 1px solid #E1E9E5; }
@media (max-width: 560px) {
  .mn-spec th { width: 96px; padding: 10px; }
  .mn-spec td { padding: 10px; }
}
