/* --------------------
   Header
-------------------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  background: #000;
  z-index: 9999;
}

.header-inner {
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  margin-left: 25px;
}

.logo img {
  display: block;
  height: 34px;
}

/* --------------------
   PC Navigation
-------------------- */

.global-nav {
  display: flex;
  align-items: center;
  height: 100%;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 40px;
  list-style: none;
  margin: 0;
}

.nav-list > li > a,
.mega-btn {
  color: #fff;
  text-decoration: none;
  font-size: 16px;
  background: none;
  border: none;
  cursor: pointer;
  transition: color .5s, background-color .5s;
}

.nav-list > li > a:hover,
.mega-btn:hover {
  text-decoration: none;
  color: #fff;
}

@media (min-width: 769px) {
  .nav-list {
    height: 100%;
    gap: 0;
  }

  .nav-list li {
    height: 100%;
    transition: background-color .5s;
  }

  .nav-list > li > a,
  .mega-btn {
    height: 100%;
    padding: 0 20px;
    display: flex;
    align-items: center;
  }

  .nav-list li:hover {
    background: #555;
  }
}

/* --------------------
   Mega Menu
-------------------- */

.has-mega {
  position: static;
}

.mega-menu {
  position: absolute;
  top: 80px;
  left: 0;
  width: 100%;  
  background: #eee;
  padding: 32px 5vw;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  transition: .3s;
  box-shadow: 0 8px 8px rgba(0, 0, 0, .25);
}

.mega-menu-inner {
  max-width: 1150px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 26px 20px;
}

.mega-menu-inner--small {
  max-width: 858px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mega-card {
  display: block;
  border: 1px solid #e6e6e6;
  background: #fff;
  color: #000;
  text-decoration: none;
  padding: 8px 10px 8px;
  transition: .3s;
}

.mega-card:hover {
  box-shadow: 0 0 8px rgba(0, 0, 0, .5);
  color: #000;
  text-decoration: none;
}

.mega-card img {
  display: block;
  width: 100%;
  aspect-ratio: 250 / 169;
  object-fit: cover;
}

.mega-card span {
  display: block;
  margin-top: 13px;
  font-size: 16px;
  line-height: 1.4;
}

.has-mega:hover .mega-menu {
  opacity: 1;
  visibility: visible;
}

/* --------------------
   Contact Button
-------------------- */

.contact-btn {
  width: 140px;
  height: 80px;
  background: #0086c9;
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color .5s, color .5s;
}

.contact-btn:hover {
  background: #005F95;
  color: #fff;
  text-decoration: none;
}

/* --------------------
   Hamburger
-------------------- */

.hamburger {
  display: none;
  width: 40px;
  height: 40px;
  margin-right: 20px;

  background: none;
  border: none;
  cursor: pointer;

  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

.hamburger span {
  width: 30px;
  height: 2px;
  background: #fff;
  transition: .3s;
}

/* ×ボタン */

.hamburger.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* --------------------
   Mobile
-------------------- */

@media (max-width:768px) {

  .site-header {
    height: 70px;
  }

  .logo {
    margin-left: 15px;
  }

  .logo img {
    height: 30px;
  }

  .hamburger {
    display: flex;
  }

  .global-nav {
    position: fixed;
    top: 70px;
    right: -100%;

    width: 100%;
    height: calc(100vh - 70px);

    background: #000;

    display: block;

    overflow-y: auto;

    transition: .3s;
  }

  .global-nav.active {
    right: 0;
  }

  .nav-list {
    display: block;
    padding: 20px;
  }

  .nav-list li {
    border-bottom: 1px solid #333;
  }

  .nav-list > li > a,
  .mega-btn {
    display: block;
    width: 100%;
    text-align: left;
    padding: 18px 36px 18px 0;
    color: #fff;
  }

  .mega-btn {
    position: relative;
  }

  .mega-btn::before,
  .mega-btn::after {
    content: "";
    position: absolute;
    right: 2px;
    top: 50%;
    width: 16px;
    height: 2px;
    background: #fff;
    transform: translateY(-50%);
    transition: opacity .3s, transform .3s;
  }

  .mega-btn::after {
    transform: translateY(-50%) rotate(90deg);
  }

  .has-mega.open .mega-btn::after {
    opacity: 0;
    transform: translateY(-50%) rotate(0);
  }

  /* メガメニューをアコーディオン化 */

  .mega-menu {
    position: static;
    width: 100%;
    display: none;
    opacity: 1;
    visibility: visible;
    padding: 0 0 20px;
    background: #000;
  }

  .has-mega.open .mega-menu {
    display: block;
  }

  .mega-menu-inner,
  .mega-menu-inner--small {
    display: block;
    padding: 0 20px 16px;
  }

  .mega-card {
    display: block;
    padding: 10px 0;
    border: none;
    background: none;
    color: #fff;
  }

  .mega-card img {
    display: none;
  }

  .mega-card span {
    margin-top: 0;
    color: #fff;
    font-size: 16px;
  }

  .contact-btn {
    margin: 20px;
    width: calc(100% - 40px);
    height: 60px;
  }

  .has-mega:hover .mega-menu {
    opacity: 1;
    visibility: visible;
  }

}
