.top-bar {
  background: #222;
  height: 60px;
  width: 100%;
}

.header-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  display: flex;
  background-color: #fff;
  justify-content: space-between;
}

.header-nav-logo {
  width: 12rem;
  /* height: 52px; */
}

.header-nav-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left;
}

.header-nav-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-nav-link {
  text-decoration: none;
  color: #000;
  font-size: 1.2rem;
  padding: 10px 20px;
  position: relative;
  z-index: 0;
  overflow: hidden;
  transition: color 0.3s ease;
}

.header-nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: #000;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.3s ease;
  z-index: -1;
  pointer-events: none;
}

.header-nav-link:hover {
  color: #fff;
}

.header-nav-link:hover::after {
  transform: scaleX(1);
}

.header-nav-link:active {
  color: #fff;
}

.header-nav-link:active::after {
  transform: scaleX(1);
}

/* アクティブ状態のスタイル */
.header-nav-link.active {
  color: #fff;
}

.header-nav-link.active::after {
  transform: scaleX(1);
}

.header-nav-contact {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
}

.contact-btn {
  text-decoration: none;
  background: #000;
  color: #fff;
  padding: 10px 20px;
  position: relative;
  z-index: 0;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, color 0.3s ease;
}

.contact-btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -40%;
  width: 40%;
  height: 100%;
  background: rgba(255, 255, 255, 0.25);
  transform: skewX(-20deg) translateX(-150%);
  opacity: 0;
  transition: transform 0.6s ease, opacity 0.3s ease;
  z-index: -1;
  pointer-events: none;
}

.contact-btn:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.contact-btn:hover::after {
  transform: skewX(-20deg) translateX(150%);
  opacity: 1;
}

.contact-btn:active {
  color: #fff;
}

.contact-btn:active::after {
  transform: skewX(-20deg) translateX(-150%);
}

/* お問い合わせボタンのアクティブ状態のスタイル */
.contact-btn.active {
  background: #333;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* ハンバーガーメニューボタン */
.hamburger-menu {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 10px;
  z-index: 101;
}

.hamburger-menu span {
  width: 25px;
  height: 3px;
  background-color: #000;
  margin: 3px 0;
  transition: 0.3s;
  display: block;
}

.hamburger-menu.active span:nth-child(1) {
  transform: rotate(-45deg) translate(-5px, 6px);
}

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

.hamburger-menu.active span:nth-child(3) {
  transform: rotate(45deg) translate(-5px, -6px);
}

/* スマホ対応のメディアクエリ */
@media (max-width: 768px) {
  /* スマホでのテキストサイズ調整を防ぐ */
  
  .header-nav {
    padding: 5px 15px;
    align-items: center;
  }

  .header-nav-logo {
    height: 50px;
    flex-shrink: 0;
  }

  .header-nav-links {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(255, 255, 255, 0.98);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 30px;
    z-index: 100;
    backdrop-filter: blur(10px);
  }

  .header-nav-links.active {
    display: flex;
  }

  .header-nav-link {
    font-size: 1.2rem;
    padding: 15px 30px;
    text-align: center;
    width: 90%;
    margin: 0 auto;
    transition: all 0.3s ease;
  }

  .header-nav-link:hover {
    background-color: #000;
    color: #fff;
  }

  .header-nav-contact {
    display: none;
  }

  .hamburger-menu {
    display: flex;
  }

  .new-tab-icon {
    font-size: 1rem !important;
    margin-left: 5px;
  }

  .contact-mobile {
    background-color: #000 !important;
    color: #fff !important;
    border: 2px solid #000 !important;
    font-weight: bold;
  }

  .contact-mobile:hover {
    background-color: #333 !important;
    border-color: #333 !important;
  }
}

/* タブレット対応 */
@media (min-width: 769px) and (max-width: 1024px) {
  .header-nav-logo {
    width: 10rem;
  }

  .header-nav-links {
    width: 60%;
  }

  .header-nav-link {
    font-size: 1.1rem;
    padding: 8px 15px;
  }

  .contact-btn {
    padding: 8px 16px;
    font-size: 0.9rem;
  }
}
