/*
Theme Name: new_ohtani
*/



/* ====== 基本リセット ====== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "游ゴシック体", "Yu Gothic", "メイリオ", sans-serif;
  background-color: #ffffff;
  color: #222;
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ====== ヘッダー ====== */
header{
  z-index: 1;
}

.site-header {
  position: fixed;
  background-color: #ffffffb5;
  height: 60px;
  width: 100%;
}

.site_header_flex{
  display: flex;
  justify-content: space-between;
}

.logo_img{
  height: 40px;
  margin: 10px;
}

.site-header .logo {
  font-size: 2rem;
  color: #003366;
  font-weight: 700;
}

.main-nav ul {
  display: flex;
  gap: 2rem;
  margin-top: 1rem;
  list-style: none;
}

.main-nav a {
  color: #004080;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s ease;
}

.main-nav a:hover {
  color: #001f4d;
}

/* --- ハンバーガー --- */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 25px;
  height: 18px;
  cursor: pointer;
  z-index: 200;
  position: relative;
  margin: 20px 20px 0 0;
}
.hamburger span {
  display: block;
  height: 3px;
  background: #333;
  border-radius: 2px;
  transition: 0.3s;
}

/* --- オーバーレイ修正版 --- */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);  /* ← 半透明の黒 */
  z-index: 90;
  opacity: 0;
  visibility: hidden;              /* ← display:none ではなく visibility */
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.overlay.active {
  opacity: 1;
  visibility: visible;             /* ← 表示に切り替え */
}


/* --- スマホ対応 --- */
@media (max-width: 768px) {
  .main-nav {
    position: fixed;
    top: 0;
    right: -250px;
    width: 200px;
    height: 100vh;
    background: #fff;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: right 0.3s ease;
    z-index: 150;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 20px;
    list-style: none;
  }

  .hamburger {
    display: flex;
  }

  /* メニュー開いた状態 */
  .main-nav.active {
    right: 0;
  }

  /* ハンバーガーアニメーション */
  .hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translateY(10px);
  }
  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }
  .hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translateY(-10px);
  }

  /* オーバーレイON */
  .overlay.active {
    display: block;
    opacity: 1;
  }

  .logo_img{
    height: 20px;
    margin-top: 20px;
  }
}

/* ====== ファーストビュー ====== */
.hero {
  background-color: #dcefff;
  padding-bottom: 5rem;
}

.hero-img {
  width: 100%;
  height: 100vh;
  object-fit: cover;
  object-position: 20% center;
  animation: zoomIn 3s ease-in-out forwards;
}

@keyframes zoomIn{
  0%{
    transform: scale(1.2);
  }
  100%{
    transform: scale(1);
  }
}


.hero-img-box{
  position: relative;
}

.hero-img-box p{
  position: absolute;
  bottom: 20%;
  left: 6%;
  font-size: 3rem;
  font-weight: 700;
  color: #f4fdff;
  text-shadow: 4px 4px 4px rgba(0, 0, 0, 0.8);
  opacity: 0;
  transform: translateX(-10px);
  animation: fadeIn 2s ease forwards 1s;
}

@keyframes fadeIn{
  to{
    opacity: 1;
    transform: translateX(0);
  }
}

.hero-text {
  position: relative;
  color: #002a5c;
  margin-top: 10rem;
}

.hero-text h2 {
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 2rem;
  letter-spacing: 0.04em;
  text-align: center;
  color: #003366;
}

.hero-text p {
  font-size: 1.25rem;
  color: #004080;
  text-align: center;
}

/* ====== ボタン ====== */
.btn {
  background-color: #004080;
  color: #fff;
  padding: 0.8rem 2.2rem;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 3px;
  box-shadow: 0 3px 7px rgba(0,64,128,0.5);
  transition: background-color 0.3s ease;
  display: inline-block;
  cursor: pointer;
}

.btn:hover {
  background-color: #00264d;
  box-shadow: 0 5px 12px rgba(0,38,77,0.7);
}

.section-btn {
  display: inline-block;
  padding: 0.9em 2.2em;
  margin-top: 2rem;
  background-color: #003366;
  color: #fff;
  font-weight: 600;
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.3s ease;
}
.section-btn:hover {
  background-color: #0055aa;
  transform: translateY(-2px);
}

.section-btn-outline {
  display: inline-block;
  padding: 0.9em 2.2em;
  margin-top: 2rem;
  color: #003366;
  border: 2px solid #003366;
  font-weight: 600;
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.3s ease;
}
.section-btn-outline:hover {
  background-color: #003366;
  color: #fff;
  transform: translateY(-2px);
}

.section-btn-wide {
  display: block;
  width: 80%;
  max-width: 500px;
  margin: 2rem auto 0;
  padding: 1.2em 0;
  text-align: center;
  background: linear-gradient(90deg, #004080, #0078d7);
  color: #fff;
  font-weight: 700;
  border-radius: 50px;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}
.section-btn-wide:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.15);
}

/* ====== セクション ====== */

h3 {
  font-size: 1.8rem;
  margin-bottom: 2rem;
  text-align: center;
  color: #003366;
  font-weight: 700;
}

/* ====== 強みセクション ====== */
.service_section{
  padding: 3rem 0;
  width: 80%;
  margin: 0 auto;
}

.service_section h2{
  font-size: 2.2rem;
  text-align: center;
  font-weight: 700;
  color: #003366;
}

.service_truck_flex{
  display: flex;
  justify-content: center;
  margin-top: 5rem;
}

.service_truck_flex.reverse{
  flex-direction: row-reverse;
}

.service_truck_img_width{
  width: 100%;
  height: 100%;
}

.service_truck_img_width img{
  width: 100%;
  height: 300px;
  object-fit: cover;         /* はみ出す部分を切り取る */
  object-position: center;   /* 中央を基準に表示 */
  border-radius: 20px;
}

.service_truck_width{
  width: 100%;
}

.service_truck_title{
  font-size: 1.5rem;
  font-weight: bold;
  text-align: center;
  padding: 0.5rem 0;
}

.service_truck_contents{
  margin: 0 0.1rem;
  font-size: 1.2rem;
  line-height: 1.5;
  text-align: center;
}

.service_link{
  display: block;
  margin-top: 15px;
  margin-left: 10%;
  text-align: center;
  border: 1px solid black;
  width: 80%;
  padding: 10px;
  background-color: black;
  color: white;
  transition: background-color 0.5s ease;
}

.service_link:hover{
  background-color: white;
  color: black;
}

/* ====== 強みセクション ====== */
.feature_section{
  padding: 3rem 5%;
}

.feature_section h2{
  font-size: 2.2rem;
  text-align: center;
  font-weight: 700;
  margin-bottom: 2rem;
  color: #003366;
}

.feature_title{
  margin-bottom: 2rem;
}

.feature_title h3{
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  text-align: center;
  color: #003366;
  font-weight: 700;
}

.feature_title p{
  font-size: 1.1rem;
  color: #333;
  line-height: 1.9;
  text-align: center;
}

.feature-boxes {
  display: flex;
  gap: 2rem;
  justify-content: space-between;
  flex-wrap: wrap;
}

.feature-box {
  background-color: #f5fcff;
  border: 1px solid #aaccee;
  border-radius: 6px;
  padding: 1.5rem 1.2rem;
  flex: 1;
  min-width: 260px;
  box-shadow: 0 2px 8px rgba(0, 80, 160, 0.08);
  transition: box-shadow 0.3s ease;
}

.feature-box:hover {
  box-shadow: 0 5px 15px rgba(0, 80, 160, 0.15);
}

.feature-box h3{
  font-size: 2rem;
  font-weight: 700;
}

.feature-box img {
  width: 100%;
  height: 200px;
  object-fit: contain;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.feature-box h4 {
  font-size: 1.3rem;
  margin-bottom: 0.8rem;
  color: #003366;
  font-weight: 700;
  text-align: center;
}

.feature-box p {
  font-size: 1rem;
  color: #004080;
  line-height: 1.5;
}

/* ====== 事業内容 ====== */


.contents_section{
  padding: 3rem 0;
  background-color: #f0f7ff;
}

.contents_section h2{
  font-size: 2.2rem;
  text-align: center;
  font-weight: 700;
  margin-bottom: 2rem;
  color: #003366;
}

.guide_text {
  font-size: 1em;
  color: #666;
  margin-bottom: 10px;
  text-align: center;
}

/* ulリスト初期化 */
.contents-buttons {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  list-style: none;
  margin-bottom: 2rem;
}

/* li */
.contents-buttons li {
  margin: 0;
}

/* 各ボタン */
.contents-btn {
  background-color: #e2efff;
  padding: 0.6rem 1.4rem;
  border-radius: 20px;
  border: 1px solid #aaccee;
  font-weight: 600;
  color: #003366;
  box-shadow: 0 1px 4px rgba(0, 64, 128, 0.15);
  transition: background-color 0.3s ease;
  cursor: default;
}

/* ホバー・アクティブ */
.contents-btn:hover {
  background-color: #a8d0f0;
  transform: translateY(-2px);
}
.contents-btn.active {
  background-color: #0078d7;
  color: #fff;
}

/* 内容の箱 */
.contents-box {
  max-width: 80%;
  margin: 0 auto;
  background-color: #f9fcff;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  padding: 20px;
}

/* 内容テキスト（フェードアニメーション） */
.contents-content {
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}
.contents-content.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  position: relative;
}

.contents-content img {
  width: 40%;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* 右側のテキスト部分 */
.contents-content > div {
  flex: 1;
  min-width: 280px;
}

.contents-content h3 {
  font-size: 1.8rem;
  font-weight: 700;
  color: #003366;
  margin-bottom: 0.8rem;
}

.contents-content h4 {
  font-size: 1.4rem;
  color: #333;
  margin-bottom: 1.2rem;
}

.contents-content p {
  font-size: 1.2rem;
  line-height: 1.6;
  color: #444;
  margin-bottom: 0.3rem;
}


/* ====== 採用情報 ====== */
.recruit-cta {
  background-color: #e8f1fb;
  text-align: center;
  padding: 5rem 1rem;
}

.recruit-cta h3 {
  font-size: 2rem;
  color: #003366;
  margin-bottom: 1rem;
}

.recruit-cta p {
  font-size: 1.1rem;
  color: #004080;
  margin-bottom: 2rem;
}


/* ====== フッター ====== */
.site-footer {
  background-color: #f0f7ff;
  text-align: center;
  padding: 2.5rem 1rem;
  font-size: 0.9rem;
  color: #555;
  border-top: 1px solid #ccc;
}

.site-footer address {
  margin-top: 0.6rem;
  font-style: normal;
  color: #444;
}

.site-footer small {
  display: block;
  margin-top: 1rem;
  color: #666;
}

/* ====== その他業務 ====== */
.subworks-banner {
  background: #e9f2ff;
  padding: 60px 20px;
  text-align: center;
  
}

.subworks-banner h2 {
  font-size: 2.2rem;
  font-weight: 700;
  color: #003366;
  margin-bottom: 40px;
}

.sub-banner {
  display: flex;
  flex-direction: column;
  gap: 25px;
  align-items: center;
}

.sub-banner-item {
  position: relative;
  width: 90%;
  max-width: 900px;
  height: 250px;
  background-size: cover;
  background-position: center;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.sub-banner-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}

.sub-banner-box {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 20px 40px;
  text-align: left;
}

.sub-banner-box h3 {
  margin: 0;
  font-size: 1.3em;
  color: #91e5ff;
}

.sub-banner-box p {
  margin: 8px 0 12px;
  font-size: 0.9em;
}

.sub-banner-box a {
  color: #fff;
  text-decoration: underline;
  font-weight: 600;
}



/* ====== お問い合わせ ====== */
.contact-section {
  background-color: #003366; /* 濃い青 */
  color: #fff;
  text-align: center;
  padding: 80px 20px;
}

.contact-section h2 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 15px;
  letter-spacing: 1px;
}

.contact-lead {
  font-size: 1em;
  margin-bottom: 40px;
  opacity: 0.9;
}

.contact-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
}

/* メインボタン */
.contact-btn {
  display: inline-block;
  background-color: #ffffff;
  color: #003366;
  text-decoration: none;
  padding: 14px 30px;
  border-radius: 50px;
  font-weight: bold;
  transition: all 0.3s ease;
}

.contact-btn:hover {
  background-color: #cce0ff;
  transform: translateY(-3px);
}

/* セカンダリーボタン */
.contact-btn.secondary {
  background-color: transparent;
  border: 2px solid #fff;
  color: #fff;
}

.contact-btn.secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-3px);
}




/* ====== レスポンシブ ====== */
@media (max-width: 768px) {
  .main-nav ul {
    flex-direction: column;
    gap: 0.8rem;
  }

  .feature-boxes {
    flex-direction: column;
  }

  .services ul.service-list {
    flex-direction: column;
    align-items: center;
  }

  .hero {
    flex-direction: column;
  }

  .hero-img {
    max-width: 100%;
    height: 100vh;
    object-fit: cover;
    object-position: 35%;
  }

  .hero-text{
    margin: 3rem 1rem 0 1rem;
  }

  .hero-text h2{
    font-size: 1.6rem;
  }

  .hero-text p{
    font-size: 1rem;
  }

  .hero-img-box p{
    font-size: 1.5rem;
    bottom: 10%;
  }

  .service_truck_flex{
    display: block;
  }

  .service_truck_contents{
    display: none;
  }

  .contents-box {
    max-width: 95%;
    margin: 50px auto;
    padding: 20px;
  }

  .contents-content h3{
    font-size: 1.4rem;
    margin-bottom: 20px;
  }

  .contents-content h4{
    font-size: 1.1rem;
    margin-bottom: 1.2rem;
  }

  .contents-content img{
    width: 100%;
  }

  .contents-content p{
    display: none;
  }

  .feature_title h3{
    font-size: 1.6rem;
  }

  .feature_title p{
    font-size: 1rem;
  }

  .feature-box p{
    display: none;
  }

  .sub-banner-box p{
    margin: 4px 0 0 0;
  }
}



/* ==========================
   ▼ アニメーション・演出関連
========================== */

/* fade-in */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s ease, transform 1s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ヘッダーの変化 */
.site-header.scrolled {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}
.site-header img.logo_img {
  transition: transform 0.3s ease;
}
.site-header.scrolled img.logo_img {
  transform: scale(0.9);
}


/* 下線アニメーションを持つ見出し専用 */
h2.underline {
  position: relative;
  display: inline-block;
  padding-bottom: 8px;
  text-align: center;
}

/* セクション全体で中央寄せ */
section h2.underline {
  display: block;
  text-align: center;
}

/* 下線 */
h2.underline::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  height: 3px;
  width: 0;
  background: #0078ff;
  transform: translateX(-50%);
  transition: width 0.8s ease-out;
}

/* 表示された時にアニメーションするクラス（JSで追加してもOK） */
h2.underline.visible::after {
  width: 20%; /* または 100% にしてもOK */
}


