.bh{--navy:#0b2851;--blue:#0869bf;--pale:#eaf5fc;color:var(--navy);font-family:"Noto Sans JP",system-ui,sans-serif;line-height:1.65}.bh *{box-sizing:border-box}.bh img{display:block;max-width:100%}.bh a{text-decoration:none}.bh-hero{min-height:510px;display:grid;grid-template-columns:48% 52%;background:linear-gradient(110deg,#f7fbff 5%,#e4f3ff 75%,#b8e5fc);overflow:hidden;position:relative}.bh-hero-copy{padding:clamp(28px,5vw,76px);position:relative;z-index:2;align-self:center}.bh-eyebrow{font-size:.74rem;letter-spacing:.2em;font-weight:700;color:#1873b4}.bh-hero h1{font-size:clamp(1.75rem,3vw,3.05rem);line-height:1.45;letter-spacing:.025em;margin:16px 0 20px;font-weight:800}.bh-hero-copy p{font-size:clamp(.88rem,1.2vw,1.04rem);max-width:580px}.bh-hero-copy small{display:block;color:#52647a;margin-top:18px;font-size:.7rem}.bh-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:28px}.bh-btn{display:inline-flex;align-items:center;justify-content:center;gap:16px;background:#073c86;color:white!important;border-radius:9px;padding:13px 24px;font-size:.9rem;font-weight:700;border:1px solid #073c86;transition:transform .2s,background .2s}.bh-btn:hover{transform:translateY(-2px);background:#0068c8}.bh-btn-outline{background:#fff;color:#073c86!important}.bh-btn-outline:hover{background:#e8f4ff}.bh-hero-visual{display:grid;grid-template-columns:70% 30%;min-height:510px}.bh-hero-child{width:100%;height:100%;object-fit:cover;object-position:48% center}.bh-hero-strip{display:grid;grid-template-rows:repeat(3,1fr);gap:5px}.bh-hero-strip img{width:100%;height:100%;object-fit:cover}.bh-section{padding:64px clamp(18px,4vw,68px);max-width:1480px;margin:auto}.bh-section-head{text-align:center;margin-bottom:32px}.bh-section-head>span{font-size:.77rem;color:#137e7e;letter-spacing:.13em;font-weight:800}.bh-section-head h2{font-size:clamp(1.55rem,2.6vw,2.4rem);line-height:1.4;margin:4px 0 10px}.bh-section-head p{font-size:.94rem;margin:0}.bh-services{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}.bh-service{border-radius:11px;overflow:hidden;background:#f5f9fc;box-shadow:0 4px 16px #153b6120;color:var(--navy)!important}.bh-service>img{width:100%;height:155px;object-fit:cover}.bh-service-text{padding:17px;min-height:162px;position:relative}.bh-service h3{font-size:1rem;line-height:1.45;margin:0 0 12px}.bh-service p{font-size:.8rem;margin:0 0 15px}.bh-service-text>span{position:absolute;right:14px;bottom:10px;color:#178a4d;font-size:1.25rem}.bh-strengths{padding:58px 5%;background:linear-gradient(115deg,#e6f4ff,#f8fbff 48%,#e0f2fb)}.bh-strength-grid{max-width:1150px;margin:auto;display:grid;grid-template-columns:repeat(3,1fr);text-align:center}.bh-strength-grid>div{padding:8px 28px;border-right:1px solid #a9c7dc}.bh-strength-grid>div:last-child{border:0}.bh-symbol{font-size:2.7rem;color:#17467e;line-height:1}.bh-strength-grid h3{margin:12px 0 6px;font-size:1.1rem}.bh-strength-grid p{font-size:.85rem;margin:0}.bh-cases{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}.bh-case{min-width:0}.bh-case-brand{height:68px;display:flex;align-items:center;justify-content:center;text-align:center;font-weight:800;font-size:1rem;line-height:1.25}.bh-brand-logo{max-height:65px;max-width:100%;object-fit:contain}.bh-case>img{width:100%;height:170px;object-fit:cover;border-radius:7px}.bh-case-placeholder{height:170px;border-radius:7px;background:#e9eef3;color:#596b7b;display:grid;place-items:center;text-align:center;font-weight:700;font-size:.85rem}.bh-case-body{position:relative;padding:13px 3px}.bh-case h3{font-size:.95rem;line-height:1.45;margin:0 0 10px}.bh-case p{font-size:.81rem;margin:0}.bh-status{float:right;background:#3d995b;color:#fff;border-radius:5px;padding:2px 7px;font-size:.69rem;font-weight:700}.bh-center{text-align:center;margin-top:28px}.bh-contact{padding:40px clamp(22px,7vw,110px);background:linear-gradient(110deg,#092b57,#0866aa);color:white;display:flex;align-items:center;justify-content:space-between;gap:20px}.bh-contact h2{color:white;font-size:1.4rem;margin:0 0 8px}.bh-contact p{margin:0;font-size:.9rem}.bh-btn-light{background:#fff;color:#073c86!important;border-color:#fff;white-space:nowrap}.bh-news{padding:44px 20px 65px;text-align:center}.bh-news p{font-size:.86rem;color:#61718a}.bh .bh-news .bh-section-head{margin-bottom:12px}@media(max-width:950px){.bh-services{grid-template-columns:repeat(3,1fr)}.bh-cases{grid-template-columns:repeat(2,1fr)}.bh-hero{grid-template-columns:1fr}.bh-hero-visual{min-height:360px;height:360px}.bh-contact{flex-wrap:wrap}}@media(max-width:620px){.bh-hero-copy{padding:35px 22px}.bh-hero h1{font-size:1.65rem}.bh-hero-visual{height:255px;min-height:255px}.bh-services{grid-template-columns:repeat(2,minmax(0,1fr))}.bh-service>img{height:115px}.bh-service-text{padding:12px;min-height:170px}.bh-service h3{font-size:.86rem}.bh-service p{font-size:.73rem}.bh-strength-grid{grid-template-columns:1fr;gap:24px}.bh-strength-grid>div{border:0;border-bottom:1px solid #b8d4e8;padding-bottom:24px}.bh-strength-grid>div:last-child{border:0}.bh-cases{grid-template-columns:1fr}.bh-case>img,.bh-case-placeholder{height:210px}.bh-contact{padding:30px 22px}.bh-contact h2{font-size:1.2rem}.bh-section{padding:44px 15px}}
/* BRAINIER staging homepage only: remove WordPress content-width constraint.
   Do not use 100vw or negative viewport margins; they previously clipped the left edge. */
body.page:has(.bh) .wp-block-post-content,
body.page:has(.bh) .entry-content {
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}
body.page:has(.bh) .wp-block-post-content > .bh,
body.page:has(.bh) .entry-content > .bh {
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
body.page:has(.bh) .wp-block-post-title { display: none; }

/* BRAINIER top page layout adjustments */
html, body {
  overflow-x: clip;
}
body.page:has(.bh) .entry-content .bh {
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
  box-sizing: border-box;
}
.bh, .bh * {
  box-sizing: border-box;
}
.bh img {
  display: block;
  max-width: 100%;
}
.bh-hero {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}
.bh-hero-visual,
.bh-hero-strip {
  min-width: 0;
  overflow: hidden;
}
.bh-hero-child,
.bh-hero-strip img {
  min-width: 0;
}
.bh-section {
  width: 100%;
}
.bh-section-head p {
  font-size: 1rem;
  line-height: 1.85;
}
.bh-service h3 {
  font-size: 1.05rem;
}
.bh-service p,
.bh-case p,
.bh-strength-grid p {
  font-size: .9rem;
  line-height: 1.75;
}
@media (max-width: 1100px) {
  .bh-services {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .bh-services,
  .bh-cases {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .bh-hero {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 620px) {
  .bh-services,
  .bh-cases {
    grid-template-columns: minmax(0, 1fr);
  }
  .bh-service > img {
    height: 190px;
  }
  .bh-service-text {
    min-height: 0;
  }
  .bh-hero-visual {
    height: 260px;
    min-height: 260px;
  }
}
/* スマートフォン表示の微調整 */
@media (max-width: 600px) {
  .bh-hero {
    margin-top: 0;
  }

  .bh-hero-strip img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}
/* スマートフォン：メイン写真と右側3枚をすべて表示 */
@media (max-width: 600px) {
  .bh-hero-visual {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 240px 100px;
    height: auto;
    min-height: 0;
  }

  .bh-hero-child {
    width: 100%;
    height: 240px;
    object-fit: cover;
  }

  .bh-hero-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: 100px;
    gap: 4px;
    min-height: 0;
  }

  .bh-hero-strip img {
    display: block;
    width: 100%;
    height: 100px;
    min-width: 0;
    object-fit: cover;
  }
}
/* スマートフォン：メイン写真への文字のはみ出しを防ぐ */
@media (max-width: 600px) {
  .bh-hero-visual {
    position: relative;
    overflow: hidden;
    isolation: isolate;
  }

  .bh-hero-child,
  .bh-hero-strip {
    position: relative;
    z-index: 1;
  }
}
/* スマートフォン：文章と写真の重なりを解消 */
@media (max-width: 600px) {
  .bh-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    min-height: 0;
    height: auto;
  }

  .bh-hero-copy {
    position: relative;
    z-index: 2;
    width: 100%;
    min-width: 0;
    height: auto;
    align-self: auto;
    padding: 32px 22px;
  }

  .bh-hero-visual {
    position: relative;
    z-index: 1;
    width: 100%;
    min-width: 0;
    margin: 0;
    grid-row: auto;
  }
}
/* スマートフォン：文章と写真を完全に分離 */
@media (max-width: 600px) {
  .bh-hero {
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
    height: auto !important;
  }

  .bh-hero-copy {
    display: block !important;
    position: relative !important;
    flex: none !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 32px 22px !important;
    overflow: visible !important;
  }

  .bh-hero-visual {
    display: grid !important;
    position: relative !important;
    flex: none !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: 240px 100px !important;
    margin: 0 !important;
  }

  .bh-hero-child {
    width: 100% !important;
    height: 240px !important;
    object-fit: cover !important;
  }

  .bh-hero-strip {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-template-rows: 100px !important;
    gap: 4px !important;
  }

  .bh-hero-strip img {
    width: 100% !important;
    height: 100px !important;
    object-fit: cover !important;
  }
}
/* BRAINIER新トップページ：ヘッダー下の余白を縮小 */
body.page:has(.bh) main.wp-block-group {
  margin-top: 0 !important;
}

body.page:has(.bh) main.wp-block-group > .wp-block-group {
  padding-top: 0 !important;
}

/* ==========================================
   BRAINIER HOME - Text readability
   ========================================== */

/* メイン画像左側の説明文 */
.bh .bh-hero-copy p {
  color: #26384A !important;
  opacity: 1 !important;
  font-weight: 500;
}

/* 事業領域の説明文 */
.bh .bh-section-head p {
  color: #26384A !important;
  opacity: 1 !important;
  font-weight: 500;
}

/* 5つの事業紹介カード */
.bh .bh-service p {
  color: #26384A !important;
  opacity: 1 !important;
  font-weight: 500;
}

/* BRAINIERの強み */
.bh .bh-strength-grid p {
  color: #26384A !important;
  opacity: 1 !important;
  font-weight: 500;
}

/* 導入・支援実績 */
.bh .bh-case p {
  color: #26384A !important;
  opacity: 1 !important;
  font-weight: 500;
}

/* ニュースの説明文 */
.bh .bh-news p {
  color: #26384A !important;
  opacity: 1 !important;
  font-weight: 500;
}

/* 濃紺背景のお問い合わせ欄は白文字を維持 */
.bh .bh-contact,
.bh .bh-contact p,
.bh .bh-contact h2 {
  color: #FFFFFF !important;
  opacity: 1 !important;
}



/* トップページのメイン見出し調整 */
@media (min-width: 782px) {
  .bh-hero h1 {
    font-size: clamp(26px, 2.4vw, 36px);
    line-height: 1.45;
    letter-spacing: -0.02em;
    text-wrap: auto;
    overflow-wrap: normal;
    word-break: normal;
  }
}
/* ==========================================
   BRAINIER スマートフォン版トップ調整
   ========================================== */

@media screen and (max-width: 767px) {

  /* メインコピー */
  .bh-hero h1 {
    font-size: clamp(24px, 6vw, 30px) !important;
    line-height: 1.5 !important;
    letter-spacing: -0.035em !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
  }

  /* 説明文 */
  .bh-hero p {
    line-height: 1.85;
  }

}

/* ==========================================
   BRAINIER HOME - Hero and section fixes
   ========================================== */

/* パソコンでは追加の改行を表示しない */
.bh .bh-mobile-break {
  display: none;
}

/* 写真の注記 */
.bh .bh-hero-note {
  display: block;
  grid-column: 2;
  margin: 0;
  padding: 6px 14px 10px;
  font-size: 11px;
  line-height: 1.5;
  color: #526174;
  text-align: right;
}

/* 事業領域の説明文 */
.bh #bh-services .bh-section-head p {
  max-width: 720px;
  margin: 0 auto;
  text-align: left;
  line-height: 1.9;
}

/* スマートフォン */
@media (max-width: 767px) {

  /* 見出しを意味のまとまりで改行 */
  .bh .bh-mobile-break {
    display: block;
  }

  .bh .bh-hero h1 {
    font-size: clamp(22px, 5.6vw, 27px) !important;
    line-height: 1.5 !important;
    letter-spacing: -0.04em !important;
  }

  /* 注記を写真3枚の下に */
  .bh .bh-hero-note {
    width: 100%;
    padding: 8px 16px 12px;
    font-size: 11px;
    text-align: center;
  }

  /* 説明文は左揃え */
  .bh #bh-services .bh-section-head p {
    text-align: left;
  }
}

/* パソコン版：トップ写真の高さと余白を調整 */
@media (min-width: 951px) {
  .bh .bh-hero {
    height: 390px;
    min-height: 0;
    grid-template-columns: 48% 52%;
    grid-template-rows: minmax(0, 1fr) auto;
  }

  .bh .bh-hero-copy {
    grid-column: 1;
    grid-row: 1 / 3;
    padding: 30px clamp(28px, 4vw, 60px);
    align-self: center;
  }

  .bh .bh-hero-visual {
    grid-column: 2;
    grid-row: 1;
    height: 366px;
    min-height: 0;
    grid-template-columns: 68% 32%;
  }

  .bh .bh-hero-child {
    height: 366px;
    object-fit: cover;
    object-position: center 40%;
  }

  .bh .bh-hero-strip {
    height: 366px;
    min-height: 0;
    grid-template-rows: repeat(3, minmax(0, 1fr));
    gap: 4px;
  }

  .bh .bh-hero-strip img {
    height: 100%;
    min-height: 0;
    object-fit: cover;
  }

  .bh .bh-hero-note {
    grid-column: 2;
    grid-row: 2;
    padding: 3px 14px 6px;
    text-align: right;
  }
}

/* 導入・支援実績：ロゴと名称の表示 */
.bh .bh-case-brand {
  height: auto;
  min-height: 135px;
  padding: 10px 8px;
}

.bh .bh-case-brand-inner {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.bh .bh-case-brand-name {
  font-size: .88rem;
  line-height: 1.4;
  text-align: center;
  overflow-wrap: anywhere;
}

.bh .bh-case-brand .bh-brand-logo {
  width: auto;
  max-width: 95%;
  max-height: 78px;
  object-fit: contain;
}

.bh .bh-case-logo-pending {
  width: min(150px, 100%);
  min-height: 60px;
  padding: 8px;
  border: 1px dashed #b8c9d9;
  border-radius: 6px;
  background: #f4f8fb;
  color: #61778a;
  font-size: .75rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 950px) {
  .bh .bh-hero-note {
    grid-column: auto;
    grid-row: auto;
  }
}

/* Keep the homepage content inside its actual container, without horizontal overflow. */
body.page:has(.bh) main.wp-block-group,
body.page:has(.bh) main.wp-block-group > .wp-block-group {
  max-width: none !important;
}
body.page:has(.bh) .wp-block-post-content:has(.bh) {
  box-sizing: border-box;
}


/* =====================================================
   BRAINIER CASE STUDIES - logo presentation refinement
   Existing hero, page width and other sections unchanged.
   ===================================================== */
.bh #bh-cases .bh-case-brand {
  min-height: 135px;
  height: auto;
  padding: 12px 10px;
}
.bh #bh-cases .bh-case-brand-inner {
  min-height: 110px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.bh #bh-cases .bh-case-logo-pending {
  display: none;
}
.bh #bh-cases .bh-case-brand-name {
  display: block;
  font-size: clamp(.9rem, 1.15vw, 1.05rem);
  line-height: 1.55;
  font-weight: 800;
  text-align: center;
  overflow-wrap: anywhere;
}
.bh #bh-cases .bh-case-brand .bh-brand-logo {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 105px;
  object-fit: contain;
}
@media (max-width: 620px) {
  .bh #bh-cases .bh-case-brand {
    min-height: 105px;
  }
  .bh #bh-cases .bh-case-brand-inner {
    min-height: 85px;
  }
  .bh #bh-cases .bh-case-brand .bh-brand-logo {
    max-height: 90px;
  }
}

/* ==========================================================
   BRAINIER CASE STUDIES - final no-logo layout (2026-11-12)
   Hide only the upper logo/duplicate-name area of case cards.
   Keep the case photo or permission placeholder, lower title,
   status label, and description intact.
   ========================================================== */
.bh #bh-cases .bh-case-brand {
  display: none !important;
}
