/**
 * 全ページ共通のスタイル
 *
 * 1. 基本（要素の初期設定）
 * 2. 共通パーツ（余白・ボタン・見出し・矢印・画像ホバー）
 * 3. 下層ページ上部の画像（template-parts/common/page-hero.php）
 * 4. About セクション（トップページ・私たちについてで共通）
 * 5. 施工事例カード（template-parts/common/works-card.php）
 * 6. スクロール演出（assets/js/main.js と対）
 * 7. ヘッダー・スマホメニュー
 * 8. フッター
 *
 * ブレイクポイント：600px 以下＝スマホ、1000px 以下＝タブレット以下
 */

/* ==========================================================
   1. 基本
   ========================================================== */
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}
p {
  line-height: 1.8;
}
*,
*::before,
*::after {
  box-sizing: inherit;
}
a {
  text-decoration: none;
}
a:hover {
  transition: all .3s;
}
/* 旧テーマからの全体指定。背景の大きな英字（ABOUT US など）の重なり順に関わるため残しています */
span {
  position: relative;
}
h2 {
  clear: both;
  color: #000;
  font-size: 28px;
  margin: 60px 0 14px;
  font-weight: bold;
  letter-spacing: 2px;
  line-height: normal;
  padding: 20px 0;
  text-align: center;
}
h2:first-child {
  margin-top: 0;
}
table {
  border-collapse: collapse;
  width: 100%;
  margin-bottom: 30px;
  background: #fff;
}
th {
  border: 1px solid #bfbfbf;
  padding: 10px;
  background: #def1fc;
  font-weight: bold;
  text-align: center;
}
td {
  border: 1px solid #bfbfbf;
  padding: 10px;
}
ul {
  text-align: left;
}
@media screen and (max-width: 1000px) {
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }
  body {
    min-width: 320px;
    background-color: #fff;
  }
}

/* ==========================================================
   2. 共通パーツ
   ========================================================== */
.inner {
  position: relative;
  padding: 0 78px;
}
.upper {
  margin: 100px 0 80px;
}
.m--width {
  max-width: 1600px;
}
.cover-max-width {
  max-width: 1600px;
  margin: 0 auto;
}
.cover-top-service {
  width: 100%;
  margin: 100px auto 160px;
}
.btn,
.btn--menu {
  position: relative;
  display: inline-block;
  padding: 1rem 4rem;
  font-size: 1rem;
  line-height: 1;
  letter-spacing: .1em;
  text-align: center;
  vertical-align: middle;
  color: #212529;
  border-radius: .2rem;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  transition: all .3s;
}
.btn--menu {
  font-size: 1.3em;
  padding: 16px 20px;
}
.btn--orange {
  color: #fff !important;
  background-color: #007aff;
}
.btn--orange:hover {
  background: #f56500;
}
.title-content {
  font-size: 3em;
  font-weight: 600;
  margin: 0;
  line-height: 1.4;
}
.sub-title-content {
  color: red;
  font-size: .9em;
  font-weight: bold;
}
.text--a {
  line-height: 1.8;
  font-size: 1.2em;
  margin-bottom: 32px;
}
/* 赤丸の矢印付きテキスト */
.arrow_r_b {
  position: relative;
  display: inline-block;
  padding-left: 20px;
  margin-top: 14px;
  color: #333;
  font-weight: bold;
}
.arrow_r_b::before {
  content: '';
  position: absolute;
  top: 50%;
  left: -3px;
  width: 18px;
  height: 18px;
  margin-top: -9px;
  background: red;
  border-radius: 50%;
}
.arrow_r_b::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  width: 6px;
  height: 6px;
  margin-top: -4px;
  border-top: solid 2px #fff;
  border-right: solid 2px #fff;
  transform: rotate(45deg);
}
/* ホバーで画像が拡大する枠 */
.img_wrap {
  width: 100%;
  height: 300px;
  margin: 0 auto;
  overflow: hidden;
  cursor: pointer;
}
.img_wrap img {
  width: 100%;
  transition-duration: .5s;
}
.img_wrap:hover img {
  transform: scale(1.1);
  transition-duration: 1.2s;
}
@media screen and (max-width: 600px) {
  .inner {
    padding: 0 5%;
  }
  .cover-top-service {
    margin-top: 60px;
  }
  .title-content {
    font-size: 2em;
  }
}

/* ==========================================================
   3. 下層ページ上部の画像
   ========================================================== */
.mainvisual {
  position: relative;
  height: 420px;
  overflow: hidden;
}
/* 表示時に白い幕が右へ抜けていく演出 */
.mainvisual::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: #fff;
  pointer-events: none;
  animation: mainvisual 1.2s cubic-bezier(.4, 0, .2, 1) forwards;
}
@keyframes mainvisual {
  100% {
    transform: translateX(100%);
  }
}
.mainvisual img {
  width: 100%;
  height: 420px;
  object-fit: cover;
}
.mainvisual-inner {
  position: relative;
  bottom: 260px;
  max-width: 1200px;
  margin: 0 auto;
}
.mainvisual-inner h3 {
  width: fit-content;
  margin: 0;
  padding: 5px 0;
  font-size: 6em;
  color: rgba(255, 255, 255, .8);
}
.mainvisual-inner h4 {
  margin: 0;
  padding: 0 40px;
  color: rgba(255, 255, 255, .8);
}
@media screen and (max-width: 600px) {
  .mainvisual {
    height: 280px;
  }
}

/* ==========================================================
   4. About セクション（トップページ・私たちについて）
   ========================================================== */
.top-aboutus-sec {
  position: relative;
}
.cover-top-aboutus {
  display: flex;
  margin: 60px 0;
}
.left-cover-top-aboutus {
  width: 50%;
  padding-right: 40px;
}
.right-cover-top-aboutus {
  width: 50%;
}
.right-cover-top-aboutus img {
  width: 100%;
  height: 360px;
  object-fit: cover;
}
.image-top-aboutus img {
  width: 100%;
  height: 420px;
}
/* 背景の大きな英字 */
.cover-aboutus-background-text {
  position: absolute;
  bottom: -80px;
  z-index: -1;
}
.aboutus-background-text {
  color: #f0f3f7;
  font-size: 9.4em;
  font-weight: 700;
}
@media screen and (max-width: 600px) {
  .cover-top-aboutus {
    display: block;
    margin: 0 0 100px;
  }
  .left-cover-top-aboutus {
    width: 100%;
    padding-right: 0;
  }
  .right-cover-top-aboutus {
    display: none;
  }
  .aboutus-background-text {
    font-size: 1em;
  }
}

/* ==========================================================
   5. 施工事例カード
   ========================================================== */
.cover-works-list-01 {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 62px 14px;
  margin: 60px 0 70px;
}
/* 最終行が 2 件のときに左寄せにするためのダミー */
.cover-works-list-01::after {
  content: "";
  display: block;
  width: 32%;
}
.wrap-work-list-01 {
  position: relative;
  width: 32%;
  height: 380px;
  overflow: hidden;
  background-color: #fff;
  border-radius: 1%;
  box-shadow: 0 6px 15px 0 rgba(0, 0, 0, .2);
}
.service-slider img {
  position: relative;
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-bottom: 4px solid #c21500;
  border-image: linear-gradient(to right, #1c46c0 0%, #0fc9ff 100%) 1;
}
.service-slider-text {
  position: relative;
  height: 80px;
  padding: 8px 5% 0;
  overflow: hidden;
}
.service-slider-text a {
  color: #333;
  font-weight: 600;
  font-size: 16px;
}
.service-slider-text:hover a {
  opacity: .7;
}
.service-slider-category {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 4px 12px;
  color: red;
  font-size: .8em;
  font-weight: bold;
  background-color: #fff;
  border: solid 1px red;
  border-radius: 3px;
}
@media screen and (max-width: 600px) {
  .cover-works-list-01 {
    gap: 30px 0;
  }
  .wrap-work-list-01 {
    width: 48%;
    height: 260px;
  }
  .service-slider img {
    height: 200px;
  }
  .service-slider-text {
    padding: 3px 5% 0;
  }
}

/* ==========================================================
   6. スクロール演出（画面に入ったら main.js がクラスを付ける）
   ========================================================== */
/* 下からふわっと表示 */
.fade {
  opacity: 0;
  transform: translateY(30px);
  transition: all 1.5s;
}
.fade.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.load-up {
  opacity: 0;
  transform: translateY(100px);
  transition: all 2s;
}
.load-up.done {
  opacity: 1;
  transform: translate(0, 0);
}
/* 左右からスライドイン（背景の大きな英字） */
.js-reveal {
  visibility: hidden;
}
.fadeInLeft,
.fadeInRight {
  visibility: visible;
  animation: 1s both;
}
.fadeInLeft {
  animation-name: fadeInLeft;
}
.fadeInRight {
  animation-name: fadeInRight;
}
@keyframes fadeInLeft {
  0% { opacity: 0; transform: translateX(50px); }
  100% { opacity: 1; transform: translateX(0); }
}
@keyframes fadeInRight {
  0% { opacity: 0; transform: translateX(-50px); }
  100% { opacity: 1; transform: translateX(0); }
}

/* ==========================================================
   7. ヘッダー・スマホメニュー
   ========================================================== */
.header-sec {
  position: relative;
  padding: 18px 4px 16px 20px;
  border-top: 8px solid;
  border-image: linear-gradient(to right, #1c46c0, #0fc9ff) 1;
}
.cover-top-header,
.cover-header-menu {
  display: flex;
  justify-content: space-between;
}
.cover-logo-header {
  display: flex;
  justify-content: center;
  align-items: center;
}
.logo-header {
  display: block;
  width: 168px;
}
.header-menu {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0;
  list-style: none;
}
.header-menu li {
  margin-right: 24px;
  font-size: 10px;
  font-weight: bold;
  text-align: center;
  color: #333;
}
.header-menu-text-jp {
  margin-top: 1px;
  font-size: 15px;
}
.cover-header-menu li a {
  color: #333;
}
.header-menu-item a:hover {
  color: red;
  transition: .7s;
}
@media screen and (min-width: 601px) {
  .hamburger-menu {
    display: none;
  }
}
@media screen and (max-width: 600px) {
  .header-sec {
    display: flex;
    height: 70px;
    padding: 0 0 0 20px;
  }
  .logo-header {
    width: 120px;
    padding: 10px 0;
  }
  .cover-header-menu {
    display: none;
  }
  /* ハンバーガーボタン（チェックボックスで開閉） */
  #menu-btn-check {
    display: none;
  }
  .menu-btn {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 90;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 60px;
    height: 100%;
    background-color: red;
  }
  .menu-btn span,
  .menu-btn span::before,
  .menu-btn span::after {
    content: '';
    position: absolute;
    display: block;
    width: 25px;
    height: 3px;
    background-color: #fff;
    border-radius: 3px;
  }
  .menu-btn span::before {
    bottom: 8px;
  }
  .menu-btn span::after {
    top: 8px;
  }
  #menu-btn-check:checked ~ .menu-btn span {
    background-color: rgba(255, 255, 255, 0);
  }
  #menu-btn-check:checked ~ .menu-btn span::before {
    bottom: 0;
    transform: rotate(45deg);
  }
  #menu-btn-check:checked ~ .menu-btn span::after {
    top: 0;
    transform: rotate(-45deg);
  }
  /* メニュー本体（通常は画面の右外、開くと画面内へ） */
  .menu-content {
    position: fixed;
    top: 0;
    left: 100%;
    z-index: 80;
    width: 100%;
    height: 100%;
    background-color: red;
    transition: all .5s;
  }
  #menu-btn-check:checked ~ .menu-content {
    left: 0;
  }
  .menu-content ul {
    padding: 80px 10px 0;
  }
  .menu-content ul li {
    margin-top: 10px;
    list-style: none;
    border-bottom: solid 1px #fff;
  }
  .menu-content ul li a {
    position: relative;
    display: block;
    width: 100%;
    padding: 9px 15px 10px 0;
    font-size: 15px;
    color: #fff;
  }
  .menu-content ul li a::before {
    content: "";
    position: absolute;
    top: 16px;
    right: 11px;
    width: 7px;
    height: 7px;
    border-top: solid 2px #fff;
    border-right: solid 2px #fff;
    transform: rotate(45deg);
  }
}

/* ==========================================================
   8. フッター
   ========================================================== */
.site-footer {
  padding: 50px 78px 20px;
  color: #bbc5ca;
  background-color: #52656e;
}
.site-footer p {
  margin: 12px 0 8px;
}
.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-footer ul li {
  padding: 3px 0;
}
.site-footer ul li::before {
  content: "-";
  padding-right: 8px;
}
.footer-top {
  display: flex;
  gap: 6px 6%;
}
.footer-menu-list a {
  color: #bbc5ca;
}
.footer-copyright {
  margin-top: 40px;
  font-size: .7em;
}
@media screen and (max-width: 600px) {
  .site-footer {
    padding: 50px 6% 20px;
  }
  .footer-top {
    display: block;
  }
}
