/* =========================================================
   Medix Holdings - main.css (CLEAN)
   - 重複/競合の解消
   - .blk2（斜めカット）アニメをJS連動に一本化
   - no-js フォールバックのみ !important を使用
   - モバイルの全角スペース除去 & 細部調整
   ========================================================= */

/* ===== 0) Global ===== */
:root{
  --blue:#2E6F96;
  --light-blue:#6FB5D1;
  --pale-blue:#E6F1F6;
  --rule:#E6EAEF;
  --news-rule:#CFD7DF;
  --body:#2D3136;
  --page-w-max:1050px;   /* 800〜1300可変でも崩れない設計 */
  --headerH:72px;        /* 固定ヘッダー相当（アンカーの余白用） */
}

*{ box-sizing:border-box; }
html,body{ margin:0; padding:0; }
html{ scroll-behavior:smooth; }
img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }

body{
  font-family:"Noto Sans JP", system-ui, -apple-system, "Segoe UI", Roboto,
               "Hiragino Kaku Gothic ProN", "Yu Gothic", "メイリオ", sans-serif;
  color:var(--body);
  font-size:15.5px;
  line-height:1.9;
  background:#fff;
}
.wrap{ width:min(92vw, var(--page-w-max)); margin:0 auto; }
h1,h2{ letter-spacing:.14em; margin:0 0 16px; }
h1{ font-size:22px; line-height:1.4; font-weight:800; color:#fff; }
h2{ font-size:14px; line-height:1.4; font-weight:700; color:var(--blue); }
.anchor-target{ scroll-margin-top: var(--headerH); }
section{ padding:52px 0; }
section.news{ padding:0 0 36px; }

/* =========================================================
   1) Header / Slide-down Menu
   ========================================================= */
.mh-menu-btn{
  position:fixed; right:18px; top:16px;
  height:44px; padding:0 14px 0 16px;
  display:inline-flex; align-items:center; gap:8px;
  border:1px solid var(--rule); border-radius:9999px;
  background:#fff; z-index:1000; cursor:pointer;
}
.mh-menu-btn .label{
  font-size:12px; letter-spacing:.12em; font-weight:700;
  color:var(--blue); text-transform:uppercase; line-height:1;
}
.mh-menu-btn .ku-icn{
  display:inline-block; color:var(--blue);
  width:18px; height:18px;
  transform:rotate(0deg);
  transform-origin:50% 50%;
  transition:transform .25s ease;
}
.mh-menu-btn.is-open .ku-icn{ transform:rotate(180deg); }

.mh-menu{
  position:fixed; left:0; right:0; top:0; z-index:999;
  background:transparent;
  border-bottom:1px solid var(--rule);
  transform:translateY(-100%);
  transition:transform .35s ease;
  isolation:isolate;
}
.mh-menu.is-open{ transform:translateY(0); }
/* ガラス感 */
.mh-menu::before{
  content:""; position:absolute; inset:0;
  background:rgba(255,255,255,.92);
  backdrop-filter:saturate(120%) blur(6px);
  -webkit-backdrop-filter:saturate(120%) blur(6px);
  pointer-events:none; z-index:0;
}
.mh-menu::after{
  content:""; position:absolute; left:0; right:0; bottom:0; height:1px;
  background:var(--blue); pointer-events:none; z-index:2;
}
.mh-menu .wrap{ padding:18px 0; position:relative; z-index:1; }
.mh-nav-list{
  list-style:none; padding:0; margin:0;
  display:flex; gap:24px; flex-wrap:wrap;
}
.mh-nav-list a{ color:var(--blue); font-weight:700; font-size:14px; padding:8px 0; }
.mh-nav-list a.is-active{ border-bottom:2px solid currentColor; }

/* =========================================================
   2) Hero
   ========================================================= */
.hero{
  position:relative; width:100%; height:600px;
  background:#000 url("assets/index01.png") center/cover no-repeat;
background-position: 85% 45% !important; /* 横85% / 縦45% 例 */

    height: clamp(520px, 92vw, 680px); /* 背を高くしてトリミング回避 */
    background-attachment: scroll !important; /* iOS対策 維持 */
}
.hero::after{
  content:""; position:absolute; inset:0;
  background:linear-gradient(90deg, rgba(0,0,0,.35), rgba(0,0,0,0) 55%);
  pointer-events:none;
}
.hero .logo{
  position:absolute; left:24px; top:24px; width:130px; height:auto;
  filter: drop-shadow(0 0 1px #fff) drop-shadow(0 0 1px #fff) drop-shadow(0 0 1px #fff);
}
.hero .copy{
  position:absolute; left:24px; bottom:50px;
  color:#fff; text-shadow:0 2px 8px rgba(0,0,0,.35);
}
.hero .copy h1{
  font-size:16px; line-height:1.4; letter-spacing:.14em; font-weight:700;
  display:inline-block; padding-bottom:6px; border-bottom:2px solid rgba(255,255,255,.95); margin:0;
}
.hero .copy .sub{ font-size:14px; line-height:1.9; margin-top:10px; }

/* =========================================================
   3) Block2 - 斜めカット（入場 → スクロール追従）
   ========================================================= */

/* JS無効（no-js）時だけ “常時表示” を強制（通常は使わない !important） */
.no-js .blk2{ opacity:1 !important; transform:none !important; }
.no-js .blk2 .blk2-body{ transform:none !important; opacity:1 !important; }
.no-js .blk2 .blk2-bg{ transform:none !important; opacity:1 !important; }

section.blk2{ padding:0 !important; }
.blk2{
  position:relative; overflow:hidden;
  /* 入場前の初期状態（JSで .is-in を付ける） */
  transform:translateY(16px);
  opacity:0;
  --bandH:20px;
  padding-bottom:var(--bandH) !important;

  /* JSが動的に更新する値（スクロール追従） */
  --cScale:1;   /* content scale  */
  --cOpacity:1; /* content opacity */
  --bScale:1;   /* bg scale       */
  --bOpacity:1; /* bg opacity     */

  transition: transform .6s ease, opacity .6s ease;
}
.blk2.is-in{ transform:none; opacity:1; }

/* 背景：下端だけ斜め */
.blk2-bg{
  --cut:96px;
  position:absolute; inset:-1px 0 -1px 0;
  background:#c5e6f3;
  clip-path: polygon(0 0,100% 0,100% calc(100% - var(--cut)),0 100%);
  -webkit-clip-path: polygon(0 0,100% 0,100% calc(100% - var(--cut)),0 100%);
  transform:scale(var(--bScale));
  opacity:var(--bOpacity);
  transform-origin:50% 50%;
  z-index:0; pointer-events:none;
}
/* 本文 */
.blk2-body{
  position:relative; z-index:1;
  padding-top:16px; padding-bottom:80px;
  transform:scale(var(--cScale));
  opacity:var(--cOpacity);
  transform-origin:50% 50%;
  text-align:center;
}
/* スクロール追従時のカクつき防止 */
.blk2.is-anim .blk2-bg,
.blk2.is-anim .blk2-body{
  transition:none !important;
  will-change:transform, opacity;
}
.blk2-text{ text-align:center; font-size:17.5px; }

/* =========================================================
   4) Block3 - BUSINESS Cards
   ========================================================= */
.blk3{ padding:52px 0; }
.blk3 .sec-head{
  display:flex; align-items:center; gap:10px;
  font-size:28px; line-height:1.2; color:var(--blue);
  margin:0 0 40px 0; justify-content:flex-end; text-align:right;
}
.blk3 .sec-head .sec-label{ letter-spacing:.14em; font-weight:800; }
.blk3 .sec-head .sec-icn{ font-size:1.2em; line-height:1; }

.blk3-grid{
  list-style:none; padding:0; margin:0;
  display:grid; grid-template-columns:repeat(2, minmax(0,1fr));
  gap:35px; max-width:880px; margin-inline:auto;
}
.blk3-card{ overflow:hidden; border-radius:6px; }
.blk3-fig{ position:relative; margin:0; padding:0; border-radius:inherit; --bandH:20%; }
.blk3-fig img{ display:block; width:100%; height:auto; border-radius:inherit; }
/* 下部の黒帯 */
.blk3-fig::after{
  content:""; position:absolute; left:0; right:0; bottom:0; height:var(--bandH);
  background:rgba(0,0,0,.50); z-index:1; pointer-events:none;
  border-bottom-left-radius:inherit; border-bottom-right-radius:inherit;
}
/* キャプション（白文字） */
.blk3-cap{
  position:absolute; left:10px; right:10px; bottom:0; height:var(--bandH);
  display:flex; align-items:center; padding:0 12px;
  z-index:2; color:#fff; font-size:14px; font-weight:700;
}

/* 出現アニメ（左右スライド） */
.blk3-card.reveal{
  opacity:0; transform:translateX(var(--reveal-x,0));
  transition: transform .6s cubic-bezier(.16,1,.3,1), opacity .6s ease;
  transition-delay:0ms; will-change:transform, opacity;
}
.blk3-grid > li.reveal:nth-child(odd){  --reveal-x:-32px; }
.blk3-grid > li.reveal:nth-child(even){ --reveal-x: 32px; }
.blk3-card.reveal.is-show{ opacity:1; transform:none; transition-delay:var(--delay,0ms); }

/* =========================================================
   5) Block4 - NEWS
   ========================================================= */
.blk4{ padding:52px 0; }
.blk4 .sec-head{
  display:flex; align-items:center; gap:10px;
  font-size:28px; line-height:1.2; color:var(--blue);
  letter-spacing:.14em; font-weight:700; margin:0 0 16px;
}
.blk4 .sec-head .sec-icn{ font-size:1.1em; line-height:1; }

.blk4-list{
  list-style:none; padding:0; margin:0;
  border-top:1px solid var(--news-rule);
  border-bottom:1px solid var(--news-rule);
  width:100%; max-width:880px; margin-inline:auto;
}
.blk4-list > li{ border-top:1px solid var(--news-rule); }
.blk4-list > li:first-child{ border-top:none; }

.blk4-row{
  display:grid; grid-template-columns:140px 1fr;
  align-items:center; min-height:48px; padding:0 8px;
  text-decoration:none; color:inherit;
}
.blk4-date{ color:#6b7680; font-size:14px; }
.blk4-txt{ font-size:14px; }
.blk4-row:hover{ background:#f6f8fa; }

/* =========================================================
   6) Block5 - 会社概要
   ========================================================= */
.blk5{ padding:52px 0; }
.blk5 .sec-head{
  display:flex; align-items:center; gap:10px;
  font-size:28px; line-height:1.2; color:var(--blue);
  letter-spacing:.14em; font-weight:700; margin:0 0 16px;
}

.blk5-table{
  display:block; background:#fff;
  border:1px solid var(--rule); border-radius:3px; overflow:hidden;
  max-width:880px; margin:auto;
}
.blk5-table .row{
  display:grid; grid-template-columns:160px 1fr;
  border-top:1px solid var(--rule);
}
.blk5-table .row:first-child{ border-top:none; }
.blk5-table .key{
  padding:14px; font-weight:700; color:var(--blue);
  background:#fff; border-right:1px solid var(--rule);
}
.blk5-table .val{ padding:14px; background:#fff; }

/* 事業内容（列結合＝常に1カラム） */
.blk5-table--biz .row--full-head,
.blk5-table--biz .row--full{ display:grid; grid-template-columns:1fr !important; }
.blk5-table--biz .row--full-head{ border-top:1px solid var(--rule); }
.blk5-table--biz .row--full-head .key{
  padding:14px; font-weight:700; color:var(--blue);
  background:#fff; border-right:none;
}
.blk5-table--biz .row--full .val{ padding:14px; background:#fff; }
.blk5-list{ margin:0; padding-left:18px; }
.blk5-list li{ list-style:disc; line-height:1.9; }

/* MAP */
.blk5-map-embed{
  max-width:880px; margin:16px auto 0;
  border:1px solid var(--rule); border-radius:6px; overflow:hidden;
}
.blk5-map-embed iframe{ display:block; width:100%; aspect-ratio:16/9; border:0; }

/* =========================================================
   7) Block6 - お問い合わせ
   ========================================================= */
.blk6{ padding:52px 0; }
.blk6 .sec-head{
  display:flex; align-items:center; gap:10px;
  font-size:28px; line-height:1.2; color:var(--blue);
  letter-spacing:.14em; font-weight:700; margin:0 0 16px;
}
.blk6 .sec-head .sec-label{ letter-spacing:.14em; font-weight:800; }
.blk6 .sec-head .sec-icn{ font-size:1.2em; line-height:1; }

.blk6-form{
  max-width:880px; margin:0 auto;
  background:#F7FAFC; border:1px solid var(--rule);
  border-radius:6px; padding:16px;
}
.blk6-form .row{ margin-bottom:14px; }
.blk6-form label{ display:block; font-weight:700; color:var(--blue); margin-bottom:6px; }
.blk6-form input[type="text"],
.blk6-form input[type="email"],
.blk6-form input[type="tel"],
.blk6-form textarea{
  width:100%; font-size:14px;
  border:1px solid var(--rule); border-radius:6px;
  background:#fff; padding:12px 12px; line-height:1.6;
  outline:none; transition:border-color .15s ease, box-shadow .15s ease;
}
.blk6-form textarea{ resize:vertical; min-height:160px; }
.blk6-form input::placeholder, .blk6-form textarea::placeholder{ color:#9AA6B2; }
.blk6-form input:focus, .blk6-form textarea:focus{
  border-color:var(--blue);
  box-shadow:0 0 0 3px rgba(46,111,150,.15);
}
.blk6-form .chk{ display:flex; gap:8px; align-items:center; font-weight:700; color:#2b3a45; }
.blk6-form .chk input{ width:18px; height:18px; }
.blk6-form .btn{
  display:inline-block; min-width:160px; height:44px;
  padding:0 18px; border-radius:9999px; border:0;
  background:var(--blue); color:#fff; font-weight:800; letter-spacing:.06em;
  cursor:pointer; transition:filter .2s ease, transform .06s ease;
}
.blk6-form .btn:hover{ filter:brightness(1.05); }
.blk6-form .btn:active{ transform:translateY(1px); }
.blk6-form .btn:disabled{ opacity:.45; cursor:not-allowed; }
.blk6-form .err{ display:none; color:#d33; font-size:12px; margin-top:6px; }
.blk6-form .invalid + .err{ display:block; }
.blk6-form .row-submit{ margin-top:18px; text-align:center; }
.blk6-result{ max-width:880px; margin:12px auto 0; font-weight:700; }
/* 蜜壺 */
.blk6-form .hp{ position:absolute; left:-9999px; opacity:0; pointer-events:none; }

/* =========================================================
   8) Footer
   ========================================================= */
.site-footer{
  border-top:1px solid var(--rule);
  background:#f9fafb; color:#2b2b2b;
  padding:28px 16px 20px; font-size:14px; line-height:1.6;
}
.site-footer .ft-inner{
  max-width:800px; margin:0 auto;
  display:grid; grid-template-columns:3fr 2fr; align-items:stretch;
}
.ft-left{ display:flex; align-items:center; gap:20px; padding-right:24px; border-right:1px solid #ddd; }
.ft-logo img{ width:100px; height:auto; }
.ft-info{ font-style:normal; }
.ft-info .ft-name{ font-weight:700; font-size:15px; margin:0 0 6px; }
.ft-info .ft-addr{ margin:0; color:#555; }

.ft-nav{ display:flex; align-items:center; justify-content:center; padding-left:24px; min-height:100%; }
.ft-nav ul{
  display:grid; grid-template-columns:repeat(2,1fr);
  gap:10px 18px; margin:0; padding:0; list-style:none;
}
.ft-nav a{ text-decoration:none; color:#1f3a56; font-weight:700; }
.ft-nav a:hover{ opacity:.85; }

.ft-copy{
  display:block; max-width:1100px; margin:18px auto 0;
  padding-top:12px; border-top:1px solid #e5e7eb;
  color:#777; font-size:12px; text-align:center;
}

/* =========================================================
   9) Responsive (<= 768px)
   ========================================================= */
@media (max-width:768px){
  html{ font-size:15px; }
  body{ line-height:1.8; -webkit-text-size-adjust:100%; }
  .wrap{ padding:0 16px; }
  section{ padding:40px 0; }

  /* Header */
  .mh-menu-btn{ height:42px; padding:0 12px 0 14px; }
  .mh-menu .wrap{ padding:14px 0; }
  .mh-nav-list{
    display:grid; grid-template-columns:repeat(2,1fr);
    gap:12px 16px;
  }

  /* Hero */
  .hero{
	
    /* 1行で完全に上書き（色/画像/位置/サイズ/リピートを全部まとめて指定） */
    background: #000 url("assets/index01m.png") center/cover no-repeat !important;
    background-attachment: scroll !important;  
    height: clamp(440px, 58vh, 520px);
  }
  .hero .logo{ width:90px; height:auto; }
  .hero .copy{ left:16px; right:16px; bottom:30px; }
  .hero .copy h1{ font-size:14px; }
  .hero .copy .sub{ font-size:12px; }

  /* Block2 */
  .blk2{
    --bandH:60px;
    --cScale:1; --cOpacity:1; --bScale:1; --bOpacity:1; --cShift:0px;
  }
  .blk2 .blk2-body{
    transform:translateY(var(--cShift)) scale(var(--cScale));
    padding-bottom:0;
  }
  .blk2 .blk2-text{ font-size:13.5px; }
  .blk2-bg{ --cut:82px; }

  /* Block3 */
  .blk3{ padding:40px 0; }
  .blk3 .sec-head{
    font-size:24px; max-width:640px; margin:0 auto 16px;
    display:flex; gap:10px; align-items:center; justify-content:flex-end; text-align:right;
  }
  .blk3-grid{ grid-template-columns:1fr; gap:18px; max-width:640px; margin-inline:auto; }
  .blk3-fig{ border-radius:6px; --bandH:16%; }
  .blk3-fig img{ width:100%; aspect-ratio:16/10; object-fit:cover; border-radius:inherit; }
  .blk3-fig::after{ background:rgba(0,0,0,.48); }
  .blk3-cap{ font-size:13.5px; }
  .blk3-card:hover .blk3-fig img{ transform:none; }
  .blk3-card.reveal{ transform:translateY(18px); }        /* 左右→上下に簡略化 */
  .blk3-grid > li.reveal:nth-child(odd),
  .blk3-grid > li.reveal:nth-child(even){ --reveal-x:0; }

  /* Block4 */
  .blk4{ padding:40px 0; }
  .blk4-list{ border-top:1px solid var(--news-rule); border-bottom:1px solid var(--news-rule); }
  .blk4-row{ grid-template-columns:110px 1fr; min-height:56px; padding:0 8px; }
  .blk4-date, .blk4-txt{ font-size:14px; }

  /* Block5 */
  .blk5{ padding:40px 0; }
  .blk5 .wrap{ width:100% !important; padding:0 5vw !important; }
  .blk5 .sec-head{
    font-size:24px; max-width:640px; margin:0 auto 16px;
    display:flex; gap:10px; align-items:center; justify-content:flex-start; text-align:left;
  }
  .blk5-body{ width:90vw; max-width:none; margin:0 auto; padding:12px; }
  .blk5-table{ width:100%; }
  .blk5-table .row{ grid-template-columns:75px 1fr; }
  .blk5-table .key{ font-size:12px; }
  .blk5-table .val{ font-size:13px; }
  .blk5 .val, .blk5-list{ word-break:break-word; overflow-wrap:anywhere; }
  .blk5-map-embed{ max-width:640px; margin:16px auto 0; }
  .blk5-map-embed iframe{ aspect-ratio:4/3; }

  /* Block6 */
  .blk6{ padding:40px 0; }
  .blk6 .sec-head{
    font-size:24px; max-width:640px; margin:0 auto 16px;
    display:flex; gap:10px; align-items:center; justify-content:flex-start; text-align:left;
  }
  .blk6-form{ padding:12px; max-width:640px; margin:0 auto; }
  .blk6-form .row{ margin-bottom:12px; }
  .blk6-form input[type="text"],
  .blk6-form input[type="email"],
  .blk6-form input[type="tel"],
  .blk6-form textarea{
    font-size:16px; min-height:44px;   /* iOSのズーム抑止 */
  }
  .blk6-form textarea{ min-height:150px; }
  .blk6-form .btn{ width:100%; height:48px; }

  /* 細部 */
  .wrap{ width:calc(100% - 32px); }  /* 両端16pxの余白を強制 */
	
	 /* 両パターン対応 */
  footer .f-menu,
  .site-footer .ft-nav{
    display: none !important;
}
.site-footer .ft-inner{ grid-template-columns: 1fr; }
  .ft-left{ border-right: 0; padding-right: 0; justify-content: center; }
  .foot{ justify-content: center; }  /* 旧フッターの中央寄せ */
.site-footer .ft-info .ft-name{ font-size: 13px; }  /* 会社名 */
  .site-footer .ft-info .ft-addr{ font-size: 12px; }  /* 住所など */

	.mh-nav-list{
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 12px;             
  }
  /* 右列（偶数番目の項目）だけを左へ数pxシフト */
  .mh-nav-list > li:nth-child(2n){
    transform: translateX(-40px);  
  }
	
	
}


/* =========================================================
   10) Hover (PCのみ)
   ========================================================= */
@media (hover:hover) and (pointer:fine){
  .blk3-fig img{
    transform-origin:50% 50%;
    transition: transform .45s cubic-bezier(.16,1,.3,1);
    will-change:transform; backface-visibility:hidden;
  }
  .blk3-card:hover .blk3-fig img,
  .blk3-card:focus-within .blk3-fig img{
    transform: translateZ(0) scale(1.03);
  }
}
