/* ====== Base Reset ====== */
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans JP", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;line-height:1.7;color:#1a1a1a;background:#fff}
img{max-width:100%;height:auto;display:block}
a{color:#1374d1;text-decoration:none}
a:hover{text-decoration:underline}
.container{width:min(1100px, 100%);margin-inline:auto;padding-inline:clamp(12px,3vw,24px)}
.sp-only{display:none}
.skip-link{position:absolute;left:-999px;top:auto;height:1px;width:1px;overflow:hidden}
.skip-link:focus{left:8px;top:8px;width:auto;height:auto;background:#000;color:#fff;padding:.5rem;z-index:10000}

/* ====== Header / Nav ====== */
.site-header{border-bottom:1px solid #e5e7eb;background:#fff;position:sticky;top:0;z-index:50}
.header-inner{display:flex;align-items:center;gap:20px;justify-content:space-between;padding:.6rem 0}
.logo img{display:block}
.nav ul{display:flex;gap:22px;align-items:center;margin:0;padding:0;list-style:none}
.nav a{padding:.5rem .25rem}
.nav .cta a{background:#5fb747;color:#fff;padding:.5rem .8rem;border-radius:6px}
.hamburger{display:none;position:relative;width:42px;height:38px;background:transparent;border:0}
.hamburger span{position:absolute;left:8px;right:8px;height:2px;background:#222;border-radius:1px;transition:.25s}
.hamburger span:nth-child(1){top:10px}
.hamburger span:nth-child(2){top:18px}
.hamburger span:nth-child(3){top:26px}

/* ====== Layout: Sidebar + Content ====== */
.layout{display:grid;grid-template-columns:280px 1fr;gap:24px;width:min(1200px, 100%);margin:24px auto}
.sidebar{border:1px solid #e5e7eb;border-radius:10px;padding:14px;background:#fafafa}
.side-list{list-style:none;padding:0;margin:0;display:grid;gap:8px}
.side-list a{display:block;padding:.6rem .8rem;border-radius:8px;border:1px solid #e5e7eb;background:#fff}
.side-list a:hover{background:#effaf0;border-color:#c7efc4}
.content{min-width:0}

/* ====== Hero ====== */
.hero{position:relative;border-radius:12px;overflow:hidden;background:#eef6ff}
.hero-img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;filter:saturate(.95)}
.hero-inner{position:relative;z-index:1;padding:56px 0;display:grid;gap:10px}
.hero::after{content:"";position:absolute;inset:0;background:linear-gradient(90deg, rgba(19,116,209,.8) 0%, rgba(19,116,209,0.2) 70%);}

/* text in hero */
.hero h1{color:#fff;font-weight:800;font-size:clamp(1.5rem, 2.5vw + 1rem, 2.4rem);margin:0}
.hero p{color:#eef6ff;margin:0 0 10px 0}
.btn{display:inline-block;padding:.7rem 1rem;border-radius:8px;border:1px solid transparent}
.btn.primary{background:#5fb747;color:#fff}
.btn.primary:hover{filter:brightness(1.05)}

/* ====== Section / Cards ====== */
.section{padding:26px 0}
.section h2{font-size:1.3rem;border-left:6px solid #bad80a;padding-left:.6rem;margin:0 0 14px 0}
.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:18px}
.card{border:1px solid #e5e7eb;border-radius:12px;padding:14px;background:#fff;box-shadow:0 1px 0 rgba(0,0,0,.02)}
.card h3{margin:.2rem 0 .4rem 0}
.card .link{display:inline-block;margin-top:.4rem}

/* ====== News ====== */
.news{list-style:none;margin:0;padding:0;display:grid;gap:10px}
.news li{border:1px solid #edf2f7;padding:10px;border-radius:10px;background:#fff}
.news time{display:inline-block;width:9.5em;color:#666}

/* ====== Page ====== */
.page{padding:30px 0}
.table{width:100%;border-collapse:collapse;border:1px solid #e5e7eb}
.table th,.table td{padding:.7rem;border-top:1px solid #e5e7eb;text-align:left}
.table th{background:#f7fafc;width:30%}
.timeline{padding-left:0;list-style:none;display:grid;gap:8px}
.timeline li span{display:inline-block;background:#bad80a;color:#fff;padding:.2rem .5rem;border-radius:6px;margin-right:.5rem}
.map-embed iframe{width:100%;min-height:320px;border:0;border-radius:10px}

/* ====== Form ====== */
.form .grid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}
.form label{display:grid;gap:6px}
.form label.full{grid-column:1/-1}
.form input,.form select,.form textarea{font:inherit;padding:.6rem;border-radius:8px;border:1px solid #d1d5db;background:#fff}
.req{color:#e11d48;font-size:.8rem;margin-left:.4rem}
.hidden{position:absolute;left:-5000px}
.form-actions{display:flex;align-items:center;gap:12px;margin-top:10px}
.privacy a{text-decoration:underline}

/* ====== Footer ====== */
.site-footer{margin-top:30px;border-top:1px solid #e5e7eb;background:#fafafa}
.footer-grid{display:grid;grid-template-columns:1fr auto;gap:20px;padding:18px 0}
.copy{text-align:center;color:#666;font-size:.9rem;margin:0;padding:10px 0 20px}

/* ====== Responsive ====== */
@media (max-width: 1023px){
  .layout{grid-template-columns:1fr}
  .sidebar{order:2}
  .content{order:1}
}
@media (max-width: 767px){
  .sp-only{display:inline}
  .nav{display:none;position:absolute;inset:60px 0 auto 0;background:#fff;border-bottom:1px solid #e5e7eb}
  .nav.open{display:block}
  .nav ul{flex-direction:column;align-items:flex-start;padding:10px 14px;gap:10px}
  .hamburger{display:block}
  .hero-inner{padding:40px 0}
  .form .grid{grid-template-columns:1fr}
}

/* == Solutions Carousel == */
.cards.carousel { position: relative; }
.cards.carousel .card { display: none; animation: fade .35s ease; }
.cards.carousel .card.is-active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(4px);} to { opacity: 1; transform: none; } }

/* ドット（任意） */
.carousel-dots { display: flex; justify-content: center; gap: 8px; margin-top: 10px; }
.carousel-dots button {
  width: 8px; height: 8px; border-radius: 50%;
  background: #d1d5db; border: 0; padding: 0; cursor: pointer;
}
.carousel-dots button[aria-current="true"] { background: #5fb747; }

/* 横はみ出しの安全網 */
html, body { overflow-x: hidden; }

/* 埋め込み要素のはみ出し防止 */
iframe, .map-embed iframe { max-width: 100%; }

/* モバイルメニューが横幅を超えないように */
@media (max-width: 767px){
  .nav{ width:100%; left:0; right:0; }
  .footer-grid{ grid-template-columns: 1fr; } /* フッター2列→1列 */
}

/* ヒーロー画像のはみ出し対策（既にあるが念のため） */
.hero{ overflow: hidden; }

/* News list */
.news-list{display:grid;gap:18px}
.news-item{display:grid;grid-template-columns:220px 1fr;gap:14px;align-items:start;border:1px solid #e5e7eb;border-radius:12px;padding:12px;background:#fff}
.news-item .thumb{display:block;border-radius:8px;overflow:hidden}
.news-item img{width:100%;height:auto;display:block}
.news-item .body{display:grid;gap:6px}
.news-item h2{margin:0;font-size:1.1rem}
.news-item time{color:#666;font-size:.9rem}
@media (max-width: 767px){ .news-item{grid-template-columns:1fr} }

/* 2カラムは layout にだけ指定 */
.layout{
  display:grid;
  grid-template-columns:260px 1fr; /* ← 基本の2カラムを明示 */
  gap:24px;
}
.sidebar{ grid-column:1; }
#main   { grid-column:2; }

/* フッターは常に全幅（gridの内外どちらでも安全） */
.site-footer{ grid-column:1 / -1; }

/* 既存のレスポンシブ指定があるならそれを活かす */
@media (max-width:1023px){
  /* 1カラム化 */
  .layout{
    grid-template-columns:1fr;
    gap:16px;
  }

  /* ★これが重要：PCで付けた「grid-column:2」をリセットして1列目に揃える */
  .sidebar, #main{
    grid-column:1 !important;
  }

  /* サイドバーの固定を解除して通常フローへ */
  .sidebar{
    position: static;   /* sticky解除（必要なら） */
    width: auto;
    margin-top:16px;
    order:2;            /* メインの下に来させたい場合だけ。不要なら削ってOK */
  }

  #main{ order:1; }     /* ↑を使うときだけセットで */
}


/* ===== Work media block ===== */
.work{
  display:grid;
  grid-template-columns: 360px 1fr;   /* 画像 / テキスト */
  gap: 20px;
  align-items: start;
  padding: 20px 0;
  border-bottom: 1px solid #e5e7eb;
}
.work-media img{ width:100%; height:auto; display:block; border-radius:10px; }
.work-body h2{ margin:.2rem 0 .3rem; font-size:1.6rem; }
.work-body .lede{ color:#333; font-weight:600; margin:.2rem 0 .6rem; }
.work-body .bullets{ margin:.2rem 0; padding-left:1.2em; }
.work-body .bullets li{ margin:.2rem 0; }

/* 交互に画像位置を左右入れ替えたい時（任意）
.work:nth-of-type(even) .work-media{ order:2; }
.work:nth-of-type(even) .work-body{ order:1; }
*/

@media (max-width: 1023px){
  .work{ grid-template-columns: 1fr; }
}

/* ===== Side accordion ===== */
.side-list{ list-style:none; margin:0; padding:0; display:grid; gap:8px; }
.acc-btn{
  width:100%; text-align:left; font:inherit; background:#fff;
  border:1px solid #e5e7eb; border-radius:8px; padding:.7rem .9rem; cursor:pointer;
  display:flex; align-items:center; justify-content:space-between; gap:8px;
}
.acc-btn:hover{ background:#f8fafc; }
.acc-icon{ inline-size:1em; block-size:1em; position:relative; }
.acc-icon::before, .acc-icon::after{
  content:""; position:absolute; inset:50% auto auto 0; translate:0 -50%;
  width:1em; height:2px; background:#333; border-radius:2px;
}
.acc-icon::after{ rotate:90deg; transition:rotate .2s ease; }
.acc-btn[aria-expanded="true"] .acc-icon::after{ rotate:0deg; } /* マイナス表示 */

.acc-panel{ margin:.4rem 0 0 .2rem; padding-left:0; list-style:none; display:grid; gap:6px; }
.acc-panel[hidden]{ display:none; }
.acc-panel a{
  display:block; padding:.55rem .8rem; border:1px solid #e5e7eb; border-radius:8px; background:#fff;
}
.acc-panel a:hover{ background:#f3f4f6; }

/* デスクトップでは最初から開いておく運用でもOK */
@media (min-width: 1024px){
  .acc-btn[aria-expanded="false"] + .acc-panel{ display:none; }
}

.intro-trust{padding:20px 0 8px;border-bottom:1px solid #e5e7eb}
.intro-trust .intro-copy{color:#333;line-height:1.9}
/* ===== HERO: Pro ===== */
.hero.pro{
  position: relative;
  min-height: clamp(420px, 72vh, 640px);
  border-radius: 14px;
  overflow: hidden;
  margin: 12px 0 24px;
  box-shadow: 0 6px 24px rgba(0,0,0,.08);
}
.hero.pro .hero-bg{
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 40%;
  display: block;
}
.hero.pro .hero-overlay{
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,.25) 0%, rgba(0,0,0,.35) 60%, rgba(0,0,0,.45) 100%),
    radial-gradient(1200px 600px at 20% 20%, rgba(0,0,0,.25), transparent 60%);
  pointer-events: none;
}
.hero.pro .hero-inner{
  position: relative;
  z-index: 2;
  padding: clamp(20px, 4vw, 56px);
  display: grid; gap: 14px;
  color: #fff;
  max-width: 980px;
}
.hero.pro .kicker{
  display:inline-block;
  font-weight:700; letter-spacing:.08em;
  background: rgba(255,255,255,.15);
  border:1px solid rgba(255,255,255,.3);
  padding:.25rem .6rem; border-radius:999px;
  backdrop-filter: blur(2px);
}
.hero.pro h1{
  margin: 4px 0 2px;
  font-weight: 800;
  line-height: 1.1;
  font-size: clamp(1.6rem, 3.4vw + .6rem, 3rem);
  text-wrap: balance;
}
.hero.pro h1 .em{ color:#b7f36b; } /* アクセント（お好みで） */

.hero.pro .lede{
  font-size: clamp(1rem, .6vw + .9rem, 1.2rem);
  line-height: 1.9;
  color: rgba(255,255,255,.95);
  max-width: 46em;
}

.hero.pro .cta-row{
  display:flex; gap:12px; flex-wrap:wrap; margin-top: 4px;
}
.hero.pro .btn.primary{
  background:#5fb747; color:#fff; border:1px solid rgba(255,255,255,.15);
}
.hero.pro .btn.ghost{
  background:transparent; color:#fff; border:1px solid rgba(255,255,255,.4);
}
.hero.pro .btn.ghost:hover{ background: rgba(255,255,255,.08); }

.hero.pro .proof{
  display:flex; gap:12px; flex-wrap:wrap;
  margin-top:10px; padding:0; list-style:none;
}
.hero.pro .proof li{
  background: rgba(255,255,255,.12);
  border:1px solid rgba(255,255,255,.3);
  border-radius: 10px;
  padding:.45rem .7rem;
  font-size:.95rem;
  backdrop-filter: blur(2px);
}
.hero.pro .proof strong{ font-weight:700; margin-right:.25em; }

.hero.pro .scroll-cue{
  position:absolute; left:50%; bottom:10px; transform:translateX(-50%);
  color:#fff; font-size:.85rem; opacity:.8; letter-spacing:.1em;
  padding-left:18px;
}
.hero.pro .scroll-cue::before{
  content:""; position:absolute; left:0; top:50%; width:12px; height:12px;
  border-right:2px solid #fff; border-bottom:2px solid #fff; transform: translateY(-30%) rotate(45deg);
  opacity:.9;
}

/* 動画の上に写真も置くため、videoとpicture双方に同じクラスを付与 */
.hero.pro video.hero-bg{ display:block; }
@media (max-width: 767px){
  .hero.pro{ border-radius:10px; }
  .sp-only{ display:inline; }
}
@media (min-width: 768px){
  .sp-only{ display:none; }
}

.form-message {
  margin: 0 0 24px;
  padding: 16px 18px;
  border-radius: 10px;
  font-weight: 700;
}

.form-message.success {
  color: #155724;
  background: #d4edda;
  border: 1px solid #c3e6cb;
}

.form-message.error {
  color: #721c24;
  background: #f8d7da;
  border: 1px solid #f5c6cb;
}

.news-section {
  background: #f7f8fa;
}

.top-news-list {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.top-news-card {
  display: block;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  color: inherit;
  text-decoration: none;
}

.top-news-card:hover {
  transform: none;
  box-shadow: none;
}

.top-news-date {
  display: block;
  margin-bottom: 2px;
  color: #222;
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.4;
}

.top-news-title {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.35;
}

.top-news-title a {
  color: #006fd6;
  text-decoration: none;
  font-weight: 700;
}

.top-news-title a:hover {
  text-decoration: underline;
}

.news-empty {
  margin-top: 24px;
  padding: 24px;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 16px;
  color: #555;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: #006fd6;
  text-decoration: none;
}

.text-link::after {
  content: "→";
}

.text-link:hover {
  text-decoration: underline;
}