/* スマホ専用ヘッダー */
.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background: linear-gradient(135deg, #2c3e50, #3498db);
  color: white;
  z-index: 10000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.mobile-header-content {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  padding: 0 15px;
  position: relative;
}

.mobile-header-logo {
  font-size: 18px;
  font-weight: bold;
  color: white;
  text-decoration: none;
  text-align: center;
}

.mobile-header-logo:hover {
  color: #ecf0f1;
  text-decoration: none;
}

/* ハンバーガーメニューボタン（ヘッダー内） */
.hamburger-menu {
  display: none;
  width: 40px;
  height: 40px;
  background-color: rgba(255,255,255,0.1);
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 6px;
  flex-direction: column;
  justify-content: space-around;
  padding: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
}

.hamburger-menu:hover {
  background-color: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.5);
}

.hamburger-menu span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: white;
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

/* ハンバーガーメニューアニメーション */
.hamburger-menu.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger-menu.active span:nth-child(2) {
  opacity: 0;
  transform: scale(0);
}

.hamburger-menu.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* モバイルメニュー */
.mobile-menu {
  display: block;
  position: fixed;
  top: 60px;
  right: -300px;
  width: 280px;
  height: calc(100vh - 60px);
  background: #f8f9fa;
  border-left: 1px solid #dee2e6;
  z-index: 9999;
  transition: right 0.3s ease;
  overflow-y: auto;
  box-shadow: -2px 0 10px rgba(0,0,0,0.1);
}

.mobile-menu.active {
  right: 0;
}

.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #e9ecef;
  background-color: #f8f9fa;
}

.mobile-menu-header h3 {
  margin: 0;
  color: #2c3e50;
  font-size: 18px;
}

.mobile-menu-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #6c757d;
  cursor: pointer;
  padding: 5px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-menu-close:hover {
  color: #dc3545;
  background-color: #e9ecef;
  border-radius: 50%;
}

.mobile-menu-content {
  padding: 20px;
}

.mobile-menu a {
  display: block;
  padding: 15px 0;
  text-decoration: none;
  color: #333;
  border-bottom: 1px solid #e9ecef;
  font-size: 16px;
  transition: color 0.3s ease;
}

.mobile-menu a:hover {
  color: #3498db;
  background-color: #f1f3f4;
  padding-left: 10px;
}

.menu-section {
  margin: 20px 0;
}

.menu-section h4 {
  margin: 0 0 15px 0;
  font-weight: bold;
  color: #2c3e50;
  font-size: 18px;
  border-bottom: 2px solid #3498db;
  padding-bottom: 5px;
}

/* メニューオーバーレイ */
.mobile-menu-overlay {
  display: none !important;
  pointer-events: none !important;
}

.mobile-menu-overlay.active {
  display: block !important;
  opacity: 1 !important;
  pointer-events: all !important;
}

/* コンテンツのマージン調整 */
.mobile-content {
  margin-top: 0;
  transition: margin-top 0.3s ease;
}

/* デスクトップ表示時は非表示 */
@media screen and (min-width: 768px) {
  .mobile-header {
    display: none !important;
  }
  
  .hamburger-menu {
    display: none !important;
  }
  
  .mobile-menu {
    display: none !important;
  }
  
  .mobile-menu-overlay {
    display: none !important;
  }
  
  /* PC表示時の画像サイズ制限 */
  img[src*="mark11.jpg"] {
    max-width: 452px !important;
    width: auto !important;
    height: auto !important;
  }
}

/* モバイル表示時のみ表示 */
@media screen and (max-width: 767px) {
  .mobile-header {
    display: block !important;
  }
  
  .hamburger-menu {
    display: flex !important;
    position: absolute !important;
    right: 15px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    left: auto !important;
    width: 40px !important;
    height: 40px !important;
    background-color: rgba(255,255,255,0.1) !important;
    border: 2px solid rgba(255,255,255,0.3) !important;
  }
  
  .hamburger-menu span {
    background-color: white !important;
    height: 3px !important;
    transition: all 0.3s ease !important;
    transform-origin: center !important;
  }
  
  .hamburger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px) !important;
  }
  
  .hamburger-menu.active span:nth-child(2) {
    opacity: 0 !important;
    transform: scale(0) !important;
  }
  
  .hamburger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px) !important;
  }
  
  .mobile-menu {
    display: block !important;
    position: fixed !important;
    top: 60px !important;
    right: -300px !important;
    width: 280px !important;
    height: calc(100vh - 60px) !important;
    background: #f8f9fa !important;
    border-left: 1px solid #dee2e6 !important;
    z-index: 9999 !important;
    transition: right 0.3s ease !important;
    overflow-y: auto !important;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1) !important;
  }
  
  .mobile-menu.active {
    right: 0 !important;
  }
  
  .mobile-menu-overlay {
    display: block !important;
  }
  
  .mobile-menu-overlay.active {
    display: block !important;
    opacity: 1 !important;
  }
  
  .mobile-content {
    margin-top: 70px !important;
    padding-top: 10px !important;
  }
  
  /* ページコンテンツの調整 */
  body {
    padding-top: 0 !important;
  }
  
  /* フォーム要素の調整 */
  .entFormTb {
    margin-top: 10px !important;
  }
  
  /* 最初の要素がヘッダーに隠れないように */
  .entFormTb:first-child,
  form:first-child {
    margin-top: 20px !important;
  }
  
  /* メイン画像のレスポンシブ対応 */
  img {
    max-width: 100% !important;
    height: auto !important;
  }
  
  /* 特にmark11.jpgなどのロゴ画像 */
  img[src*="mark11.jpg"] {
    max-width: 90% !important;
    width: auto !important;
    height: auto !important;
    margin: 10px auto;
    display: block;
  }
  
  /* 中央寄せのための調整 */
  p[align="center"] img {
    display: block;
    margin: 0 auto;
  }
} 