/* 基本設定 */
:root {
  /* color */
  --color-green: #009944; /* main-color (text・background等) */
  --color-light-gray: #eaeaea; /* (border・background等) */  
  --color-gray: #c1c1c1; /* (border等) */
  --color-dark-gray: #828282; /* (news-date等) */
  --color-red: #d00000;
  --color-bg-dark: rgba(0,0,0,0.7);

  /* layout */
  --container-width: 1280px;
  --header-height: 60px;

  /* animation */
  --transition: 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-box: border-box;
}

html, body {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: "Helvetica Neue",
  Arial,
  sans-serif;
  color: black;
  line-height: 1.6;
}

/* Header */
.header {
  height: var(--header-height);
  display: flex;
  align-items: center;
  padding-left: 3%;
  background: var(--color-bg-dark);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  box-sizing: border-box;
  z-index: 1000;
}

.header-inner {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
}

.header-logos {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-header {
  height: 30px;
  width: auto;
}

.logo-text {
  height: 20px;
  width: auto;
}

.menu-trigger {
  display: none; /* PCでは隠す */
  background: none;
  border: none;
  cursor: pointer;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 10px;
  margin-left: auto;
}

.nav {
  margin-left: auto;
  text-decoration: none;
  font-size: 16px;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: stretch;
}

.nav-link {
  display: flex;
  align-items: center;
  height: var(--header-height);       /* headerと同じ */
  padding: 0 25px;
  color: white;
  text-decoration: none;
  font-size: 14px;
  font-weight: bold;
}

.nav > ul {
  display: flex;
  align-items: stretch;
  list-style: none;
  margin: 0;
  padding: 0;
}

.btn-contact {
  background: var(--color-green);
  color: white;
  text-decoration: none;
  border-radius: 0;
}

.dropdown {
  position: absolute;
  top: var(--header-height);         /* headerの高さと合わせる */
  left: 0;
  background: var(--color-bg-dark);
  min-width: 200px;
  display: none;
  flex-direction: column;
  /* box-shadow: 0 5px 15px rgba(0,0,0,0.1); */
  list-style: none;
  padding: 0;
  margin: 0;
  z-index: 100;
}

.dropdown li a {
  display: block;
  padding: 12px 16px;
  color: white;
  text-decoration: none;
}

.dropdown li a:hover {
  opacity: 0.7;
}

.has-dropdown > .nav-link::after {
  content: "\f078"; /* FontAwesomeの 'angle-down' のUnicode */
  font-family: "Font Awesome 6 Free";
  font-weight: 900; /* 必須：FontAwesomeを表示するのに必要 */
  font-size: 12px;
  margin-left: 8px;
  transition: transform var(--transition);
  display: inline-block;
}

@media (hover: hover) {
  .has-dropdown:hover .dropdown {
    display: flex;
  }

  .has-dropdown:hover > .nav-link::after {
    transform: rotate(180deg);
  }
}

/* JS制御 */
.has-dropdown.is-open .dropdown {
  display: flex;
}

.has-dropdown.is-open > .nav-link::after {
  transform: rotate(180deg);
}

/* Main・Container */
.main {
  flex: 1;
}

.title-section {
  height: 250px;
  display: flex;
  align-items: flex-end;
  background-image: url("../images/topback.jpg");
  background-size: cover;
  background-position: center bottom;
  background-repeat: no-repeat;
  padding-left: 4%;
  padding-bottom: 2.5%;
  box-sizing: border-box;
}

.page-title {
  color: white;
  font-size: 40px;
  font-weight: bold;
  z-index: 1;
}

.main-content {
  background: white;
  /* min-height: 350px; */
}

.container {
  width: 80%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 5%;
  box-sizing: border-box;
}

/* Footer */
.footer .container {
  display: flex;
  justify-content: space-between;
}

.logo-footer {
  height: 100px;
  width: auto;
}

.footer-links {
  display: flex;
  gap: 60px;
  flex-shrink: 1;
  color: var(--color-green);
  font-weight: bold;
}

.footer-links a,
.footer-links a:visited,
.footer-links a:active {
  color: var(--color-green);
  text-decoration: none;
}

.footer-links a:hover {
  opacity: 0.7;
}

.footer-title {
  display: block;
  font-weight: bold;
  margin-bottom: 30px;
}

.footer-sub {
  display: block;
  font-size: 14px;
  margin-bottom: 6px;
  text-decoration: none;
}

.copyright {
  background: var(--color-green);
  color: white;
  text-align: center;
  padding: 10px;
}

/* Responsive (Mobile) */
@media (max-width: 768px) {
  body.overflow-hidden {
    overflow: hidden;
  }

  .header {
    padding-right: 3%;
  }

  .header-inner {
    display: flex;
    align-items: center;
    width: 100%;
  }

  .menu-trigger {
    display: block; /* ボタンを表示 */
    z-index: 101;
  }

  .nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background-image: url("../images/topback.jpg");
    background-size: cover;
    background-position: left bottom;
    background-repeat: no-repeat;
    padding-top: 60px; 
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    overflow-y: auto;
  }

  /* メニューが開いた時 */
  .nav.is-show {
    right: 0;
  }

  .nav ul {
    display: flex;
    flex-direction: column;
    padding: 0 40px;
    width: 100%;
    box-sizing: border-box;
    list-style: none;
  }

  .nav-link,
  .nav .dropdown li a {
    display: block;
    padding: 15px 0;
    color: white;
    text-decoration: none;
    height: auto;
    font-size: 1.4em; 
    line-height: 1.4;
  }

  .dropdown li a:hover {
    background: transparent;
  }

  .nav-item {
    display: block;
    width: 100%;
    margin: 10px 0;
    text-align: left;
  }

  /* ハンバーガーメニュー内ではドロップダウンを最初から表示 */
  .nav .dropdown {
    position: static;        /* 固定解除 */
    display: flex;           /* 常に表示 */
    flex-direction: column;
    background: none;
    box-shadow: none;
    padding: 0;
    margin-left: 30px;       /* インデント（字下げ）を作る */
    border-top: none;        /* PC用の線を消す */
  }

  .btn-contact {
    background: white !important; /* お問い合わせだけ白背景に */
    color: var(--color-green) !important;
    text-align: center;
    border-radius: 50px;
    font-weight: bold;
    padding: 18px 0 !important;
  }

  /* グループ会社の横の矢印を消す（全展開のため） */
  .has-dropdown > .nav-link::after {
    display: none;
  }

  .container {
    width: 100%;
  }

  /* Footer */
  .footer .container {
    flex-direction: column; /* 縦並びにする */
    align-items: center;    /* 中央寄せ */
    padding-top: 20px;
    padding-bottom: 60px;
  }

  .logo-footer {
    height: 80px; /* スマホ用に少し小さく調整 */
    margin-bottom: 40px;
  }

  .footer-links {
    flex-direction: column; /* メニューを縦に並べる */
    width: 100%;           /* 横幅いっぱい */
    gap: 0;                /* gapをリセットしてボーダーで管理 */
  }

  .footer-links .group,
  .footer-links .company_profile, 
  .footer-links .contact {
    width: 90%;           /* 左右に少し余白を持たせる */
    margin: 0 auto;
  }

  /* ボーダーの設定 */
  .footer-title {
    margin-bottom: 0;      /* マージンをリセット */
    padding: 20px 0;       /* 上下に余白 */
    border-top: 2px solid var(--color-green); /* 上の緑線 */
    position: relative;
    font-size: 18px;
  }

  /* 最後の項目の下に線を引く */
  .contact .footer-title {
    border-bottom: 2px solid var(--color-green);
  }

  /* 「＋」マークの再現 */
  .group .footer-title::after {
    content: "\2b"; /* plus */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
  }

  /* アクティブな時だけサブメニューを表示 */
  .group.is-active .footer-sub {
    display: block;
    padding: 10px 0 10px 20px; /* 少し右にずらしてリスト感を出す */
  }

  /* アクティブな時は記号を「−」に変更 */
  .group.is-active .footer-title::after {
    content: "\f068";
  }

  /* アニメーションを滑らかにしたい場合（オプション） */
  .footer-sub {
    display: none;
    transition: all var(--transition);
  }
}