/* ================================================
   Header Structure (Based on Astrim Design)
   ================================================ */

/* Utility Classes */
.flex {
  display: flex;
}

.flex-j-between {
  justify-content: space-between;
}

.flex-j-ctr {
  justify-content: center;
}

.flex-a-ctr {
  align-items: center;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  background-color: #fff;
  z-index: 1000;
  transition: all 0.3s ease;
}

.header:not(.no-shadow) {
  box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.05);
}

.header > .inner {
  width: 100%;
  max-width: 100%;
  height: 100%;
  padding-left: 1.5rem;
}

/* Logo */
.header--logo_box {
  gap: 0;
}

.header--logo {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  font-family: "Noto Serif JP", serif;
}

.header--logo a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.header--logo a:hover {
  opacity: 0.7;
}

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

.header--logo .company-name {
  color: #333333;
}

/* Navigation */
.gnav,
.gnav ul,
.gnav li,
.gnav a {
  height: 100%;
}

@media (max-width: 767px) {
  .gnav,
  .gnav ul,
  .gnav li,
  .gnav a {
    height: auto;
  }
}

.gnav {
  display: flex;
  padding-right: clamp(170px, 11.25vw, 180px);
}

.gnav a {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Menu */
.gnav--menu {
  gap: 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.gnav--menu li {
  position: relative;
}

.gnav--link {
  line-height: 1.4;
  text-align: center;
  color: #4b5563;
  text-decoration: none;
  transition: color 0.3s ease;
  padding: 0 0.5rem;
  font-family: "Noto Sans JP", sans-serif;
}

.gnav--menu > li > .gnav--link {
  position: relative;
}

.gnav--menu > li > .gnav--link::after {
  content: '';
  position: absolute;
  bottom: 0.5rem;
  left: 50%;
  translate: -50% 0;
  width: 0;
  height: 2px;
  background-color: #185246;
  transition: width 0.3s ease;
}

.gnav--menu > li:hover > .gnav--link {
  color: #185246;
}

.gnav--menu > li:hover > .gnav--link::after {
  width: 80%;
}

/* Contact Button */
.gnav--contact {
  position: absolute;
  right: 0;
  top: 0;
}

.gnav--contact a {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  font-size: 1rem;
  gap: 0.5rem;
  padding: 0;
  line-height: 1;
  background: linear-gradient(135deg, #185246 0%, #247a65 100%);
  background-size: 250% auto;
  background-position: 0 0;
  color: #ffffff;
  border-radius: 0;
  width: clamp(132px, 11.25vw, 180px);
  aspect-ratio: 180/170;
  text-decoration: none;
  transition: all 0.3s ease;
}

.gnav--contact a:hover {
  background-position: 100% 0;
}

.gnav--contact svg {
  width: 1.8125rem;
  height: auto;
}

/* Hamburger Button */
.gnav_btn {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  width: 4rem;
  height: 4rem;
  cursor: pointer;
  z-index: 9999;
  transition: all 0.3s ease;
}

.gnav_btn.active {
  background-color: rgba(24, 82, 70, 0.1);
}

.gnav_btn--lines {
  position: relative;
  width: 1.5rem;
  height: 1rem;
}

.gnav_btn--lines span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #185246;
  transition: all 0.3s ease;
}

.gnav_btn--lines span:nth-of-type(1) {
  top: 0;
}

.gnav_btn--lines span:nth-of-type(2) {
  top: 50%;
  transform: translateY(-50%);
}

.gnav_btn--lines span:nth-of-type(3) {
  bottom: 0;
}

.active .gnav_btn--lines span:nth-of-type(1) {
  transform: translateY(0.4375rem) rotate(-45deg);
}

.active .gnav_btn--lines span:nth-of-type(2) {
  opacity: 0;
}

.active .gnav_btn--lines span:nth-of-type(3) {
  transform: translateY(-0.4375rem) rotate(45deg);
}

/* Mobile Styles */
@media (max-width: 767px) {
  .header {
    height: 4rem;
  }

  .header > .inner {
    padding-left: 1.5rem;
  }

  .header--logo {
    font-size: 1.25rem;
  }

  .gnav_btn {
    display: flex;
  }

  .gnav {
    position: fixed;
    top: 4rem;
    right: 0;
    z-index: 300;
    width: 100%;
    height: calc(100% - 4rem);
    margin: 0;
    padding: 1.5rem 7%;
    opacity: 0;
    pointer-events: none;
    overflow: auto;
    background-color: #fff;
    transform: translateX(100%);
    -webkit-overflow-scrolling: touch;
    transition: all 0.3s ease;
    flex-direction: column;
    padding-right: 7%;
    justify-content: flex-start;
  }

  .gnav.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
  }

  .gnav--menu {
    display: block;
    margin-bottom: 0.5rem;
    height: auto;
  }

  .gnav--menu li {
    position: relative;
    display: block;
    width: 100%;
    height: auto;
  }

  .gnav--menu li:not(:last-child) {
    border-bottom: 1px dotted #185246;
  }

  .gnav--link {
    display: block;
    padding: 1.125rem 1rem;
    text-align: left;
    height: auto;
  }

  .gnav--menu li a::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0.625rem;
    margin: auto;
    width: 0.4375rem;
    height: 0.4375rem;
    border-top: 1px solid #185246;
    border-right: 1px solid #185246;
    transform: rotate(45deg);
  }

  .gnav--menu > li > .gnav--link::after {
    display: none;
  }

  .gnav--contact {
    position: relative;
    text-align: center;
    height: auto;
  }

  .gnav--contact a {
    flex-direction: row;
    width: auto;
    aspect-ratio: auto;
    padding: 1rem 2rem;
    margin: 0 auto;
    border-radius: 0.5rem;
  }
}

/* Desktop Only */
@media (min-width: 768px) {
  .gnav_btn {
    display: none !important;
  }
}

/* Tablet Adjustment */
@media (max-width: 1440px) {
  .gnav--menu {
    gap: 1.5rem;
  }

  .gnav a {
    font-size: 0.9375rem;
  }
}
