/*----------------------------------------
  リセットCSS & 基本設定
----------------------------------------*/
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}


html, body {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
  font-family: 'Segoe UI', sans-serif;
  scroll-snap-type: y mandatory;
  overflow-y: auto;
  overflow-x: hidden;
}

:root {
  --header-height: 130px;
}

/*----------------------------------------
  共通要素スタイル
----------------------------------------*/
ul, ol { list-style: none; }
a { text-decoration: none; }
article, aside, footer, header, nav, section { display: block; }

/*----------------------------------------
  ヘッダー & ナビゲーション
----------------------------------------*/
header {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 88px;
  background-color: #3171b9;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 30px;
  box-sizing: border-box;
  z-index: 1000;
}

.logo {
  width: 500px;
  height: 88px;
  display: flex;
  align-items: center;
}

.logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-grow: 1;
  gap: 30px;
  margin: 10px;
}

.nav-links { display: flex; gap: 25px; }

.nav-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0em 0.1em;
  height: 2.5em;
  line-height: 1;
  font-size: 14px;
  font-weight: bold;
  color: white;
  text-decoration: none;
  box-sizing: border-box;
  border-radius: 4px;
  transition: background-color 0.3s, color 0.3s;
}

.nav-links a:hover { color: #ff8c00; }

.nav-contact-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.85em;
  color: white;
}

.contact-row { display: flex; gap: 15px; flex-wrap: wrap; }
.contact-row span { white-space: nowrap; }

.menu-toggle { display: none; }
.menu-toggle.open::before { content: "X"; }

.thislocation {
  position: relative;
  display: inline-block;
  padding: 20px 10px;
  background-color: #1D9EBF;
  color: #FFFFFF;
  border-radius: 10px;
}

.section-anchor { scroll-margin-top: 90px; }

/*----------------------------------------
  サブナビゲーション
----------------------------------------*/
.sub-nav {
  background-color: #f8f8f8;
  padding: 10px 0;
  border-top: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
  text-align: center;
  position: fixed;
  top: 88px;
  left: 0;
  width: 100%;
  z-index: 1000;
  overflow: auto;
}

.sub-nav ul {
  display: inline-flex;
  gap: 20px;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sub-nav li a {
  color: #333;
  font-weight: 500;
  padding: 5px 10px;
  transition: color 0.3s ease;
  text-decoration: none;
}

.sub-nav li a:hover { color: #0078d4; }

.sub-nav li p {
  font-weight: 500;
  padding: 5px 10px;
  transition: color 0.3s ease;
}

.line {
  height: 1px;
  background-color: #07346B;
  margin: 0;
}

.column2 h2 {
  margin: 0 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #07346B;
}

/*----------------------------------------
  フッター
----------------------------------------*/
footer {
  background-color: #3171b9;
  color: #fff;
  padding: 40px 20px;
  font-size: 14px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-left {
  flex: 1 1 300px;
  margin: 10px;
}

.footer-left p:first-child { margin-top: 5px; }

.footer-right {
  flex: 1 1 300px;
  margin: 10px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.footer-right h4 {
  font-size: 16px;
  margin: 5px 0;
  border-bottom: 1px solid #fff;
  padding-bottom: 5px;
}

.sitemap { list-style: none; padding: 0; margin: 0; }
.sitemap li { margin: 6px 0; }

.sitemap a {
  color: #fff;
  text-decoration: none;
  transition: opacity 0.3s;
}

.sitemap a:hover { opacity: 0.7; }

/*----------------------------------------
  セクション
----------------------------------------*/
h2 { text-align: center; font-size: 38px; }

.master-columns2 {
  display: flex;
  gap: 20px;
  margin: 20px;
  overflow: hidden;
  align-items: stretch;
}

.photo-column {
  flex: 1;
  margin-left: 5px;
  padding: 0;
  display: flex;
  justify-content: center;
}

.photo-column img {
  width: 70%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
}

.text-box {
  flex: 1;
  margin-left: 5px;
  margin-right: 0;
  text-align: left;
}

.text-box h2 {
  font-size: 20px;
  color: #07346B;
  text-align: left;
}

.process { margin: 20px; }

.inline-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  padding: 0;
}

.inline-list li {
  background: #eee;
  padding: 5px 10px;
  border-radius: 4px;
}

.photo-column2 {
  flex: 1;
  margin-left: 5px;
  padding: 0;
  display: flex;
  justify-content: center;
}

.photo-column2 img {
  width: 40%;
  height: 35%;
  max-height: 100%;
  object-fit: contain;
  padding: 10px 20px 50px;
}

.column2 p { 
    text-align: center;
}

.container2 {
  width: 100%;
  display: block;
  padding: 40px;
  box-sizing: border-box;
  height: auto;
  margin-bottom: 40px;
  overflow: hidden;
    margin-top: 130px;
}

.column2 {
  padding: 15px;
  width: 100%;
  margin-bottom: 150px;
  box-sizing: content-box;
}

.column2 h2 {
  font-size: 50px;
  padding-bottom: 5px;
  text-align: center;
  margin: 150px;
}

ul { list-style: none; padding-left: 0; }
ul li { margin: 5px 0 5px 10px; }

.sublist { margin-left: 15px; font-size: 0.95em; }

.pbtm-wrapper { text-align: center; margin-top: 40px; }

.pbtm {
  display: inline-block;
  padding: 25px 50px;
  background-color: #3171b9;
  color: #fff;
  font-weight: bold;
  font-size: 28px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.pbtm:hover { background-color: #1d4f8b; }

/* 画像ボックス */
.imagebox {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.imagebox img {
  width: 100%;
  height: auto;
  object-fit: cover;
  margin: 10px 20px;
}

.imagebox2 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.imagebox2 img {
  width: 100%;
  height: auto;
  object-fit: cover;
  margin: 10px 20px;
}

.imagebox3 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.imagebox3 img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

/*----------------------------------------
  レスポンシブ対応（max-width: 768px）
----------------------------------------*/
@media screen and (max-width: 768px) {
  header {
    position: fixed;
    top: 0; left: 0;
    height: 90px;
    padding: 0 15px;
  }

  .logo img { width: 80%; height: 100%; object-fit: contain; }

  .section-anchor {
    height: auto;
    padding-top: var(--header-height);
    padding-bottom: 60px;
  }

  .menu-toggle {
    font-family: 'Segoe UI','Arial', sans-serif;
    display: block;
    font-size: 28px;
    cursor: pointer;
    position: absolute;
    right: 15px; top: 25px;
    z-index: 1100;
    color: #FFF;
    transition: all 0.3s ease;
  }

  .nav-container {
    position: absolute;
    top: calc(90px + 110px);
    left: 0;
    width: 100%;
    background: #3171b9;
    flex-direction: column;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.4s ease;
    margin: 0; padding: 0;
  }

  .nav-container.active { max-height: 800px; }

  .nav-links { flex-direction: column; width: 100%; }

  .nav-links a {
    padding: 15px;
    border-bottom: 1px solid #eee;
    color: #fff;
    text-align: center;
  }

  .nav-contact-info { 
      padding: 10px 15px;
      color: #fff;
    }

  #main-service {
      margin-top: 170px;
      padding-top: 20px;
      text-align: center;
    }

  .photo-column { order: 2; }
  .text-box { order: 1; text-align: center; margin-right: 0; }
  .column2 { grid-template-columns: 1fr; }
  .photo-column, .text-box { flex: none; width: 100%; }
  .sub-nav { padding: 10px 0; overflow: hidden; }
  .sub-nav ul {
    display: flex; flex-wrap: wrap; justify-content: center;
    gap: 10px; padding: 0 10px; margin: 0 auto;
  }
  .sub-nav li { flex: 1 1 auto; text-align: center; }
  .sub-nav li a {
    display: inline-block;
    font-size: 14px;
    padding: 6px 12px;
    background-color: #eee;
    color: #333;
    border-radius: 4px;
    white-space: normal;
    word-break: keep-all;
  }

    .sub-nav li a:hover {
        background-color: #ddd; 
    }

    .container2{
        font-size: 20px;
        text-align: center;
        
    }
    
  .pbtm {
      font-size: 20px;
      padding: 15px 30px; 
    }
    
  .column3 {
      margin: 0 10px 20px; 
    }

  html, body {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
      overflow-x: hidden;
    }
    
  *, *::before, *::after {
      box-sizing: inherit;
    }

  #CPmesse {
    width: 100%;
    padding-top: 90px;
    margin-top: 90px;
  }

  #CPmesse h1 {
    font-size: 3rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    font-weight: 600;
    letter-spacing: 0.03em;
  }

  .contents-field {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 5vw;
    text-align: center;
  }

  .text-box {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    text-align: center;
  }
    
  .imagebox, .imagebox2, .imagebox3 {
    grid-template-columns: 1fr;
  }

  .imagebox img, .imagebox2 img, .imagebox3 img {
    width: 100%;
    height: auto;
    margin-bottom: 20px;
  } 
}