/* --- 共通リセット --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Yu Gothic', '游ゴシック体', 'YuGothic', sans-serif;
  background-color: #f1f1f1;
  line-height: 1.6;
  padding-top: 80px;
  color: #333;
  overflow-x: hidden;
}

.wrapper {
  max-width: 1200px;
  text-align: center;
  margin: auto;

}

.blue-text {
  color: #086db7;
}

h2,
h3 {
  color: #086db7;
  font-size: 2rem;
  text-align: left;
}

h3 {
  margin-bottom: 3%;
  font-size: 1rem;
  padding-left: 1%;
  z-index: 100;
  position: relative;
}

.title {
  position: relative;
  font-size: 1.8em;
  color: #0073b6;
  z-index: 100;
}




/* --- ヘッダー --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: #fff;
  border-bottom: 1px solid #ccc;
  z-index: 999;
}

.header-inner {
  /* max-width: 1200px; */
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 240px 15px 100px;
}

.logo {
  font-weight: bold;
  font-size: 1.5em;
}

.nav-links {
  display: flex;
  gap: 40px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.header-nav a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  transition: color 0.3s ease;
}

.header-nav a:hover {
  color: #007BFF;
}

.header-nav {
  position: relative;
  /* これが基準になる！ */
  display: flex;
  align-items: center;
  gap: 30px;
}

.contact-button {
  position: absolute;
  right: -620px;
  top: -30px;
  height: 100%;
  background-color: #000;
}

.contact-button a {
  background-color: #000;
  display: flex;
  align-items: center;
  color: #fff;
  text-decoration: none;
  padding: 44px 430px 43px 20px;
  height: 100%;
  transition: background-color 0.3s;
  gap: 8px;
}

.contact-button a:hover {
  /* background-color: #333; */
}

.contact-button a::before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  background-image: url(../images/PC/contact-icon.png);
  background-size: contain;
  background-repeat: no-repeat;
  margin-right: 8px;
  position: relative;
  top: 1px;
}

.phone-button:link,
.phone-button:visited {
  color: inherit;
  text-decoration: none;
}

/* --- 各セクション共通 --- */
section {
  text-align: center;
  padding: 100px 0 0 0;
}

section p {
  line-height: 1.8;
}

/* --- MVセクション --- */
.mv {
  position: relative;
  margin-top: -100px;
}

.mv img {
  width: 100%;
  display: block;
}

.mv-scroller {
  width: 100%;
  height: 600px;
  overflow: hidden;
  position: relative;
  background-color: #f5f5f5;
}

.mv-track {
  display: flex;
  width: max-content;
}

.mv-track img {
  width: 600px;
  height: 600px;
  margin-right: 20px;
  border-radius: 20px;
  object-fit: cover;
}

.mv .catch {
  position: absolute;
  top: 84%;
  left: 18%;
  color: #000;
  background-color: #fff;
  font-size: 1.5em;
  font-weight: bold;
  padding: 2px;
}

.mv .catch-1 {
  top: 59%;
  font-size: 2.4rem;
}

.mv .catch-2 {
  top: 69%;
  font-size: 2.4rem;
}

.mv .catch-3 {
  top: 81%;
  font-size: 1.3rem;
}

/* --- MV下のコンテンツ --- */

.service-contents {
  position: relative;
}

.about-title {
  font-size: 2rem;
}

.about-text {
  margin: 2% 0 4%;
}

.about {
  position: relative;
  padding: 50px 0 0 0;
}

.about::before {
  content: "";
  position: absolute;
  bottom: -66px;
  left: -370px;
  width: 370px;
  height: 370px;
  top: 10px;
  background-image: url(../images/PC/back-image.png);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  z-index: -1;
  pointer-events: none;
}


/* --- 事業内容 --- */
.works {
  margin-bottom: 3%;
}

.sub-title {
  font-size: 2rem;
  padding: 2% 0;
  color: #086db7;
  text-align: left;
}

.service-item1,
.service-item2 {
  background-color: #FFF;
  padding: 3%;
}

.service-item1 {
  position: absolute;
  width: 65%;
  margin-bottom: 5%;
  top: -395px;
  right: 0%;
}

.service-item1 p,
.service-item2 p {
  text-align: left;
}

.service-item2 {
  width: 65%;
  margin: -1px 0 5%;
  position: relative;
  z-index: 10;
}

.services {
  position: relative;
  z-index: 1;
  padding: 70px 0 0 0;
  scroll-margin-top: 30px;
}

.services::after {
  content: "";
  position: absolute;
  bottom: -210px;
  left: -15px;
  width: 370px;
  height: 370px;
  background-image: url(../images/PC/back-image.png);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  z-index: -1;
  pointer-events: none;
}


.border-line {
  border-bottom: 1px solid #777;
  margin: 2% 0 4%;
  width: 50%;
}

.blue-space {
  position: absolute;
  background-color: #086db7;
  padding: 140px 24%;
  right: 0;
  /* margin-top: 23%; */
  top: 55%;
}

.blue-space::after {
  content: "";
  position: absolute;
  bottom: 294px;
  right: 0px;
  width: 370px;
  height: 370px;
  background-image: url(../images/PC/back-image.png);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  z-index: 0;
  pointer-events: none;
}

.service-img {
  text-align: left;
  margin-left: -14px;
  margin-bottom: 20%;
}

.heading {
  position: relative;
}



/* --- 実績一覧 --- */
.works {
  position: relative;
}

.blue-back {
  position: absolute;
  background-color: #086db7;
  color: #fff;
  z-index: 1;
  left: 0%;
  padding: 5% 38%;
  margin-top: -3%;
}

.font-white {
  color: white;
}


.works-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px 6px;
  justify-items: center;
  margin: 0 auto;
  margin-top: -25px;
  position: relative;
  z-index: 100;
}

.works-grid img {
  width: 100%;
  height: auto;
}

/* --- 会社概要 --- */
.company {
  position: relative;
  z-index: 1;
}

.company img {
  width: 100%;
}

#popup-gallery {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.gallery-content {
  position: relative;
  max-width: 600px;
  width: 80%;
  text-align: center;
}

#gallery-image {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

/* 閉じるボタン */
.close {
  position: absolute;
  top: -30px;
  right: 0;
  color: white;
  font-size: 28px;
  cursor: pointer;
}

/* ナビゲーションボタン（外に出す） */
.nav-buttons {
  position: absolute;
  top: 50%;
  left: -60px;
  right: -60px;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
  pointer-events: none;
  /* 外枠にだけ反応させるため */
}

.nav-buttons .prev,
.nav-buttons .next {
  pointer-events: auto;
  color: white;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  user-select: none;
  background: none;
  border: none;
}


.company::after {
  content: "";
  position: absolute;
  bottom: -80px;
  right: 0px;
  width: 370px;
  height: 370px;
  background-image: url(../images/PC/back-image.png);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  z-index: -1;
  pointer-events: none;
}

.company-image {
  margin: 0 auto 20px;
  display: block;
}

.company-info {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  display: inline-block;
  text-align: left;
  line-height: 2;
}

.company-details {
  margin: 0 auto;
  padding: 20px;
  font-family: 'Yu Gothic', '游ゴシック体', 'YuGothic', sans-serif;
  background-color: #FFF;
}

.company-row {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid #999;
  padding: 16px 0;
  align-items: flex-start;
}

.label {
  width: 140px;
  font-weight: bold;
  text-align: left;
  padding-left: 5%;
}

.value {
  flex: 1;
  text-align: left;
  padding-left: 15%;
}

.row-others {
  display: flex;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #999;
}

.row-others .label {
  width: 140px;
  font-weight: bold;
  text-align: left;
  padding-left: 5%;
}

.row-others .value {
  flex: 1;
  text-align: left;
  padding-left: 15%;
  line-height: 1.6;
}


/* --- お問い合わせ --- */
.contact {
  background: url('../images/PC/contact.png') center/cover no-repeat;
  padding: 85px 20px;
  color: white;
  position: relative;
  margin: 5% 0 2%;
  position: relative;
  z-index: 100;
}

.contact-overlay {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  /* gap: 40px; */
  flex-wrap: wrap;
  max-width: 1200px;
  margin: auto;
}

.contact .contact-phone {
  background: rgba(255, 255, 255, 0.5);
  padding: 30px 145px;
  font-weight: bold;
  text-decoration: none;
  transition: background 0.3s;
  display: flex;
  align-items: center;
  border: 2px solid #FFF;
  font-size: 1.4rem;
}

.contact .mail-button-wrapper {
  background: rgba(255, 255, 255, 0.5);
  padding: 15px 145px;
  font-weight: bold;
  text-decoration: none;
  transition: background 0.3s;
  display: flex;
  align-items: center;
  border: 2px solid #FFF;
  font-size: 1.4rem;
}

.mail::before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  background-image: url(../images/PC/contact-icon.png);
  background-size: contain;
  background-repeat: no-repeat;
  position: relative;
  top: 5px;
}


.contact-mail {
  text-align: center;
  font-weight: bold;
  font-size: 1.4rem;
}

.mail-button-wrapper {
  margin-top: 10px;
}

.mail-button,
.phone-button {
  text-decoration: none;
}

.mail {
  color: #fff;
  padding: 10px 20px;
  display: inline-block;
  cursor: pointer;
}


/* --- フッター --- */
footer {
  text-align: center;
}

.footer-logo {
  font-size: 1.5em;
  font-weight: bold;
  margin-bottom: 30px;
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 30px;
  list-style: none;
  padding: 0;
}

.footer-nav a {
  text-decoration: none;
  color: #000;
  transition: color 0.3s;
}

.footer-nav a:hover {
  /* color: #fff; */
}

.copyright {
  font-size: 12px;
  opacity: 0.8;
  background-color: #000;
  /* 背景：黒 */
  color: #fff;
  /* 文字色：白 */
  padding: 10px 0;
  /* 上下に少し余白を追加 */
  margin-top: 20px;
}




/* ハンバーガーアイコン（650px以下で表示） */
.hamburger-menu {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 10px;
  z-index: 1001;
}

.hamburger-menu span {
  width: 25px;
  height: 1px;
  background-color: #fff;
  display: block;
  transition: all 0.3s ease;
}

/* メニュー開閉時 */
.hamburger-menu.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 10px);
}

.hamburger-menu.active span:nth-child(2) {
  opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -10px);
}


.pc-only {
  display: block;
}

.sp-only {
  display: none;
}

#backToTopBtn {
  visibility: hidden;
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 9999;
  color: white;
  border: none;
  padding: 15px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 18px;
  background-color: transparent;
  opacity: 0;
  /* 初期状態で透明 */
  transition: opacity 0.3s ease-in-out, visibility 0s 0.3s;
  /* アニメーションの追加 */
}

#backToTopBtn.show {
  visibility: visible;
  /* ボタンが表示される */
  opacity: 1;
  /* 透明度が1になり表示 */
  transition: opacity 0.3s ease-in-out;
  /* フェードイン */
}

#backToTopBtn img {
  width: 85%;
}


/************************************************************************/

@media screen and (max-width: 1600px) and (min-width: 1200px) {
  .about::before {
    background-size: cover;
    left: -200px;
    width: 350px;
    height: 350px;
    top: -20px;
  }

  .mv .catch {
    left: 10%;
  }

  .services::after {
    /* left: -50px; */
  }

}


@media screen and (max-width: 1280px) {

  .logo a {
    align-items: center;
    display: flex;
  }

  .blue-space::after {
    bottom: 120%;
    right: -143px;
  }

  .services .company {
    scroll-margin-top: -150px;
  }

  .works {
    scroll-margin-top: 20px;
  }

  .services::after {
    display: none;
  }

  .company::after {
    bottom: -126px;
    right: -180px;
  }

  .about::before {
    display: none;
  }


  .pc-only {
    display: none;
  }

  .sp-only {
    display: block;

  }

  .logo {
    display: flex;
    align-items: center;
  }

  .logo img {
    width: 70%;
  }

  .hamburger-menu {
    display: flex;
    margin-left: auto;
    padding: 2% 3% 2% 3%;
    background-color: #000;
  }

  .header-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    flex-direction: column;
    align-items: center;
    padding-top: 40px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: block;
    /* ← ここ追加 */
  }

  .header-nav a {
    color: #fff;
  }



  .header-nav.active {
    transform: translateX(0);
  }

  .nav-links {
    gap: 0px;
    display: flex;
    flex-direction: column;
    width: 100%;
  }

  .nav-links li {
    border-bottom: 1px solid #ccc;
    text-align: center;
    padding: 1.4rem;
  }

  .nav-links a {
    display: block;
  }

  .nav-links li:last-child {
    border-bottom: 1px solid #ccc;
    width: 100%;
    padding: 1.4rem;
  }

  .contact {
    background: url('../images/SP/contact.png') center/cover no-repeat;
  }

  .contact-button {
    position: static;
    background-color: transparent;
  }

  .contact-button a {
    padding: 10px 0;
    color: #000;
    background: none;
  }



  html,
  body {
    overflow-x: hidden !important;
  }

  .header-inner {
    padding: 0px 0px 0px 30px;
    max-width: none;
  }

  .mv-scroller {
    height: auto;
  }

  .mv-track img {
    width: 300px;
    height: 300px;
  }

  .mv .catch {
    left: 5%;
  }

  .mv .catch-1 {
    top: 65%;
    font-size: 1.3rem;
  }

  .mv .catch-2 {
    top: 75%;
    font-size: 1.3rem;
  }

  .mv .catch-3 {
    top: 87%;
    font-size: 0.6rem;
  }

  .about-text {
    padding: 3% 10%;
    font-size: 0.9rem;
  }

  .about-title {
    font-size: 1.6rem;
  }

  .sub-title {
    font-size: 1.6rem;
  }

  .blue-back {
    top: 61px;
    padding: 80px 60%;
    margin-left: -40%;
  }

  .blue-space {
    margin: 0px;
    position: absolute;
    top: 34%;
    padding: 23% 20%;
    z-index: -1;
  }



  .service-img {
    text-align: center;
    margin: auto;

  }

  .service-img img {
    width: 94%;
  }

  .service-item1 {
    width: 85%;
    position: relative;
    top: 0px;
    left: 0px;
    margin: -25% auto 10%;
    padding: 5%;


  }

  .service-item2 {
    width: 85%;
    margin: 0 auto 10%;
    padding: 5%;
  }



  .works {
    padding: 80px 0 0 0;
  }


  .works-container {
    padding: 0 10%;
  }



  .works-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    width: 100%;
    margin: -25px auto 0;
  }

  .works-grid img {
    width: 100%;
    height: auto;
    display: block;
  }




  .label {
    padding-left: 8%;
  }

  .value {
    padding-left: 8%;
  }


  .row-others .label {
    padding-left: 8%;
  }

  .row-others .value {
    padding-left: 8%;
  }

  .company-details {
    padding: 50px 20px;
    margin: 12% 4%;
    font-size: 0.9rem;
  }

  .title {
    padding-left: 5%;
    font-size: 1.6rem;
  }

  h3 {
    margin-bottom: 40px;
    padding-left: 4%;
  }



  .company img {
    width: 100vw;

  }

  .mail-text {
    font-size: 1.2rem;

  }

  .contact-overlay {
    justify-content: center;
    gap: 40px;
  }

  .contact .contact-phone {
    padding: 30px 85px;
    font-size: 1.2rem;
  }

  .contact .mail-button-wrapper {
    font-size: 1.2rem;
    padding: 15px 132px;

  }

  .footer-logo img {
    width: 30%;
  }

  .footer-nav {
    font-size: 0.9rem;
  }

  .nav-buttons {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    width: 100%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    padding: 0 10px;
  }

  .nav-buttons .prev,
  .nav-buttons .next {
    font-size: 36px;
    color: white;
    pointer-events: auto;
    background-color: rgba(0, 0, 0, 0.4);
    border-radius: 50%;
    padding: 10px;
    border: none;
    user-select: none;
  }

  .header-nav {
    transform: translateX(100%);
    transition: transform 0.3s ease;
  }

  .header-nav.active {
    transform: translateX(0);
  }

}

@media screen and (max-width: 769px) {


  #backToTopBtn {
    bottom: 5px;
    right: -5px;
    z-index: 9999;
  }


  #backToTopBtn img {
    width: 75%;
  }

  .title {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 0.9rem;
  }

  .blue-back {
    top: 51px;
  }

}

@media screen and (max-width: 524px) {


  .hamburger-menu {
    display: flex;
    margin-left: auto;
    padding: 3% 4% 3% 4%;
    background-color: #000;
  }


  .title {
    font-size: 1.3rem;
  }

  h3 {
    font-size: 0.8rem;
  }




  .header-inner {
    padding: 0px 0px 0px 13px;
  }

  .about-title {
    font-size: 1.4rem;
  }

  .sub-title {
    font-size: 1.6rem;
  }



  .service-item1 {
    font-size: 0.9rem;
  }

  .service-item2 {
    font-size: 0.9rem;
  }

  .sub-title {
    font-size: 1.3rem;
  }

  .company-details {
    font-size: 0.8rem;
  }


  .row-others .value {
    padding-left: 1%;
  }

  .value {
    padding-left: 1%;
  }

  .label {
    width: 120px;
  }

  .row-others .label {
    width: 120px;
  }




  /* .title {
    padding-left: 17%;
    font-size: 1.6em;
  }

  h3 {
    padding-left: 20%;
    font-size: 0.9rem;
  } */

  .blue-back {

    padding: 70px 60%;

  }


  .mail-text {
    font-size: 1rem;

  }

  .contact .contact-phone {
    padding: 15px 50px;
    font-size: 1rem;
  }

  .contact .mail-button-wrapper {
    padding: 15px 85px;
    font-size: 1rem;
  }

  .footer-nav {
    gap: 20px;

  }
}

@media screen and (max-width: 428px) {


  .blue-back {
    top: 50px;
  }


  .sub-title {
    font-size: 1.1rem;
  }




  .footer-nav {
    font-size: 0.7rem;
  }

  .mail-text {
    font-size: 1rem;

  }

  .contact .contact-phone {
    padding: 15px 32px;
    font-size: 1rem;
  }

  .contact .mail-button-wrapper {
    padding: 15px 65px;
    font-size: 1rem;
  }

}