/* Modern Mobile Menu for DX Page */

/* Hamburger Button */
.mobile-menu-btn {
  display: none;
  position: relative;
  width: 30px;
  height: 18px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1002;
}

.mobile-menu-btn span {
  display: block;
  position: absolute;
  height: 2px;
  width: 100%;
  background: #000;
  opacity: 1;
  left: 0;
  transform: rotate(0deg);
  transition: 0.25s ease-in-out;
}

.mobile-menu-btn span:nth-child(1) {
  top: 0px;
}

.mobile-menu-btn span:nth-child(2),
.mobile-menu-btn span:nth-child(3) {
  top: 8px;
}

.mobile-menu-btn span:nth-child(4) {
  top: 16px;
}

/* Active state - transform to X */
.mobile-menu-btn.active span:nth-child(1) {
  top: 8px;
  width: 0%;
  left: 50%;
}

.mobile-menu-btn.active span:nth-child(2) {
  transform: rotate(45deg);
}

.mobile-menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg);
}

.mobile-menu-btn.active span:nth-child(4) {
  top: 8px;
  width: 0%;
  left: 50%;
}

/* Dark header - white hamburger button */
.header--dark .mobile-menu-btn span {
  background: #fff;
}

/* Mobile Menu Overlay - Not used (keeping for compatibility) */
.mobile-menu-overlay {
  display: none;
}

/* Mobile Menu Panel - Full screen overlay style (従来型と同じ) */
.mobile-menu-panel {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: #000;
  overflow-y: auto;
  z-index: 999;
  padding: 30px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu-panel.active {
  display: block;
  visibility: visible;
  animation: fadeIn 0.3s ease forwards;
}

.mobile-menu-panel.fadeOut {
  animation: fadeOut 0.3s ease forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

/* Menu Items */
.mobile-menu-nav {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-menu-item {
  /* border-bottom removed */
}

.mobile-menu-link {
  display: block;
  padding: 18px 0;
  color: #fff;
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
}

/* Dropdown Menu */
.mobile-menu-dropdown {
  position: relative;
}

.mobile-menu-dropdown-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 18px 0;
  color: #fff;
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
}

.mobile-menu-dropdown-toggle::after {
  content: '+';
  font-size: 24px;
  line-height: 1;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  color: #fff;
}

.mobile-menu-dropdown-toggle.active::after {
  transform: rotate(45deg);
}

/* Dropdown Content - スムーズな開閉アニメーション */
.mobile-menu-dropdown-content {
  padding-left: 20px;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.25s ease-out, opacity 0.2s ease-out;
}

.mobile-menu-dropdown-content.active {
  max-height: 1000px; /* 十分な高さ */
  opacity: 1;
  transition: max-height 0.3s ease-in, opacity 0.25s ease-in;
}

.mobile-menu-dropdown-link {
  display: block;
  padding: 12px 0;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 14px;
}

.mobile-menu-dropdown-link small {
  display: block;
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  margin-top: 4px;
}

/* Dropdown Heading */
.mobile-menu-dropdown-heading {
  padding: 12px 0 8px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* CTA Button */
.mobile-menu-cta {
  margin-top: 50px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mobile-menu-cta-btn {
  display: block;
  width: 100%;
  padding: 14px 20px;
  background: #fff;
  color: #000;
  text-align: center;
  text-decoration: none;
  font-weight: 600;
  border-radius: 4px;
}

.mobile-menu-cta-btn--blue {
  background: #2e6cff;
  color: #fff;
}

.mobile-menu-cta-btn span {
  display: block;
  font-size: 12px;
  font-weight: 400;
  margin-top: 4px;
  opacity: 0.8;
}

/* SNS Links */
.mobile-menu-sns {
  display: flex;
  gap: 20px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  list-style: none;
  padding-left: 0;
  justify-content: center;
}

.mobile-menu-sns li {
  margin: 0;
}

.mobile-menu-sns a {
  display: block;
}

.mobile-menu-sns img {
  width: 28px;
  height: 28px;
  opacity: 0.9;
}

/* Button Styles - Business Mobile Menu */
.mobile-menu-btn-filled {
  padding: 16px 24px;
  border-radius: 50px;
  background: #fff;
  color: #000 !important;
  border: 2px solid #fff;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  margin: 10px 0;
  transition: opacity 0.3s ease;
}

.mobile-menu-btn-outline {
  padding: 16px 24px;
  border-radius: 50px;
  background: transparent;
  color: #fff !important;
  border: 2px solid #fff;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  margin: 10px 0;
  transition: opacity 0.3s ease;
}

.mobile-menu-btn-filled:hover,
.mobile-menu-btn-outline:hover {
  opacity: 0.8;
}

/* Responsive */
@media screen and (max-width: 958px) {
  .mobile-menu-btn {
    display: block;
  }
}

/* Prevent body scroll when menu is open */
body.mobile-menu-open {
  overflow: hidden;
  position: fixed; /* iOSで確実に止める */
  width: 100%;
}
