/* 
 * LeoPalace Resort Guam - Template EN Mobile Menu Enhancement
 * sp-menu-test のモバイルメニューをtemplate-en.htmlに統合するためのCSS
 */

/* ----------------------------------------
   CSS変数定義（不足していた変数を追加）
---------------------------------------- */
:root {
  /* Colors */
  --color-primary: #918A7A;
  --color-secondary: #2d5f0f;
  --color-accent: #457429;
  --color-text: #000;
  --color-text-light: #666;
  --color-white: #fff;
  --color-border: #D3D3D3;
  --color-hover: #f0a500;
  
  /* Spacing */
  --spacing-xs: 8px;
  --spacing-sm: 12px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  
  /* Font sizes */
  --font-size-xs: 14px;
  --font-size-sm: 16px;
  --font-size-md: 18px;
  --font-size-lg: 24px;
  
  /* Transitions */
  --transition-speed: 0.3s;
}

/* ----------------------------------------
   既存のモバイルメニューを隠す（1023px以下）
---------------------------------------- */
@media (max-width: 1023px) {
  .mobile-menu-container {
    display: none !important;
  }
}

/* ----------------------------------------
   新しいモバイルヘッダー（1023px以下で表示）
---------------------------------------- */
.new-mobile-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background: transparent;
  backdrop-filter: none;
  display: none;
  align-items: center;
  justify-content: flex-end;
  padding: 0 25px;
  z-index: 1000;
  box-shadow: none;
  transition: all var(--transition-speed) ease;
}

.new-mobile-header.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  justify-content: space-between;
  padding: 0 20px;
}

.new-mobile-logo {
  opacity: 0;
  transform: translateY(-10px);
  transition: all var(--transition-speed) ease;
  order: 1;
}

.new-mobile-logo img {
  height: 30px;
  width: auto;
  margin-left: 44px;
}

.new-mobile-header.scrolled .new-mobile-logo {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1023px) {
  .new-mobile-header {
    display: flex !important;
  }
}

/* ハンバーガーメニューサイズ修正 - template-en.css に追加または置き換え */

/* ----------------------------------------
   ハンバーガーボタンのサイズ調整
---------------------------------------- */
.new-hamburger {
  width: 24px;           /* 30px → 24px に縮小 */
  height: 18px;          /* 24px → 18px に縮小 */
  position: relative;
  cursor: pointer;
  z-index: 1002;
  order: 2;
  padding: 4px;          /* 8px → 6px に縮小 */
  margin-left: auto;
  transition: all var(--transition-speed) ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.new-mobile-header.scrolled .new-hamburger {
  margin-left: 0;
}

.new-hamburger span {
  display: block;
  width: 100%;           /* ハンバーガー本体のサイズに合わせる */
  height: 1.5px;         /* 2px → 1.5px に細く */
  background: var(--color-white);
  transition: all var(--transition-speed) ease;
  position: absolute;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.2); /* シャドウも小さく */
}

.new-mobile-header.scrolled .new-hamburger span {
  background: var(--color-primary);
  box-shadow: none;
}

.new-hamburger span:nth-child(1) {
  top: 0;
}

.new-hamburger span:nth-child(2) {
  top: 50%;
  transform: translateY(-50%);
}

.new-hamburger span:nth-child(3) {
  bottom: 0;
}

/* アクティブ状態（バツ印）のアニメーション */
.new-hamburger.active span:nth-child(1) {
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
}

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

.new-hamburger.active span:nth-child(3) {
  bottom: 50%;
  transform: translateY(50%) rotate(-45deg);
}

/* ----------------------------------------
   モバイルヘッダーの調整
---------------------------------------- */
.new-mobile-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background: transparent;
  backdrop-filter: none;
  display: none;
  align-items: center;
  justify-content: flex-end;
  padding: 0 20px;       /* 25px → 20px に縮小 */
  z-index: 1000;
  box-shadow: none;
  transition: all var(--transition-speed) ease;
}

.new-mobile-header.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  justify-content: space-between;
  padding: 0 16px;       /* 20px → 16px に縮小 */
}

/* ----------------------------------------
   レスポンシブでのさらなる調整
---------------------------------------- */
@media (max-width: 768px) {
  .new-mobile-header {
    padding: 0 12px;      /* さらに狭く */
  }
  
  .new-hamburger {
    margin-right: 2px;    /* 5px → 2px に縮小 */
    width: 22px;          /* さらに小さく */
    height: 16px;
  }
  
  .new-hamburger span {
    height: 1px;          /* 線をさらに細く */
  }
}

@media (max-width: 480px) {
  .new-mobile-header {
    padding: 0 10px;      /* さらに狭く */
  }
  
  .new-hamburger {
    margin-right: 4px;    /* 10px → 4px に縮小 */
    width: 20px;          /* 最小サイズ */
    height: 15px;
  }
  
  .new-hamburger span {
    height: 1px;          /* 最も細い線 */
  }
}

/* ----------------------------------------
   極小画面対応（320px以下）
---------------------------------------- */
@media (max-width: 320px) {
  .new-mobile-header {
    padding: 0 8px;
  }
  
  .new-hamburger {
    margin-right: 2px;
    width: 18px;
    height: 14px;
    min-width: 40px;      /* 最小タッチサイズを少し縮小 */
    min-height: 40px;
  }
}

/* ----------------------------------------
   新しいメニューオーバーレイ
---------------------------------------- */
.new-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-speed) ease;
}

.new-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ----------------------------------------
   新しいサイドメニュー
---------------------------------------- */
.new-side-menu {
  position: fixed;
  top: 0;
  left: -75%;
  width: 75%;
  max-width: 350px;
  height: 100%;
  background: white;
  z-index: 1001;
  transition: left var(--transition-speed) ease;
  box-shadow: 5px 0 15px rgba(0, 0, 0, 0.1);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.new-side-menu.active {
  left: 0;
}

/* ----------------------------------------
   新しいメニューヘッダー
---------------------------------------- */
.new-menu-header {
  padding: 20px;
  border-bottom: 1px solid #eee;
  position: relative;
  flex-shrink: 0;
}

.new-menu-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 35px;
  height: 35px;
  background: #f8f9fa;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #666;
  transition: all var(--transition-speed) ease;
  z-index: 1003;
}

.new-menu-close:hover {
  background: #e9ecef;
  color: #333;
  transform: rotate(90deg);
}

.new-menu-close::before {
  content: '×';
  font-weight: bold;
  line-height: 1;
}

.new-menu-logo img {
  height: 35px;
  margin-bottom: var(--spacing-sm);
}

.new-menu-header .language-switch {
  margin-top: var(--spacing-sm);
}

.new-menu-header .language-switch a {
  color: var(--color-primary);
  font-size: var(--font-size-xs);
  margin-right: 5px;
}

.new-menu-header .language-switch .lang-active {
  color: var(--color-hover);
  font-weight: 600;
}

/* ----------------------------------------
   新しいメニューリスト
---------------------------------------- */
.new-menu-list {
  flex: 1;
  padding: 20px 0;
  overflow-y: auto;
  list-style: none;
  margin: 0;
}

.new-menu-list li {
  border-bottom: 1px solid #f0f0f0;
}

.new-menu-list li:last-child {
  border-bottom: none;
}

.new-menu-list a {
  display: block;
  padding: 15px 20px;
  color: var(--color-text);
  text-decoration: none;
  font-size: var(--font-size-sm);
  font-weight: 300;
  letter-spacing: 1px;
  transition: all var(--transition-speed) ease;
  position: relative;
}

.new-menu-list a:hover {
  background: #f8f9fa;
  color: var(--color-primary);
  padding-left: 30px;
}

.new-menu-list a:hover::after {
  opacity: 1;
}

/* 子メニュー項目 */
.new-menu-child a {
  background: #f8f9fa;
  padding-left: 35px;
  font-size: var(--font-size-xs);
  color: var(--color-text-light);
  border-left: 3px solid transparent;
}

.new-menu-child a:hover {
  color: var(--color-primary);
  background: #e9ecef;
  border-left-color: var(--color-primary);
  padding-left: 40px;
}

/* ----------------------------------------
   新しいメニューフッター
---------------------------------------- */
.new-menu-footer {
  padding: 20px;
  border-top: 1px solid #eee;
  flex-shrink: 0;
  background: #ffffff;
}

.new-social-links {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 15px;
}

.new-social-links a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e9ecef;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-light);
  text-decoration: none;
  transition: all var(--transition-speed) ease;
}

.new-social-links a:hover {
  background: var(--color-primary);
  color: white;
  transform: translateY(-2px);
}

.new-social-links svg {
  width: 20px;
  height: 20px;
}

.new-menu-address {
  text-align: center;
  font-size: 12px;
  color: var(--color-text-light);
  line-height: 1.4;
}

.new-menu-address p {
  margin-bottom: 5px;
}

.new-menu-address p:last-child {
  margin-bottom: 0;
}

/* ----------------------------------------
   レスポンシブ対応
---------------------------------------- */
@media (max-width: 768px) {
  .new-side-menu {
    width: 85%;
    left: -85%;
  }
  
  .new-mobile-header {
    padding: 0 15px;
  }
  
  .new-hamburger {
    margin-right: 5px;
  }
  
  .new-menu-close {
    top: 15px;
    right: 15px;
  }
}

@media (max-width: 480px) {
  .new-side-menu {
    width: 80%;
    left: -80%;
  }
  
  .new-mobile-header {
    padding: 0 16px;
  }
  
  .new-hamburger {
    margin-right: 38px;
  }
  
  .new-menu-close {
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    font-size: 16px;
  }
  

}

/* ----------------------------------------
   スクロール防止
---------------------------------------- */
body.new-menu-open {
  overflow: hidden;
}

/* ----------------------------------------
   アクセシビリティ対応
---------------------------------------- */
.new-hamburger:focus,
.new-menu-close:focus {
  outline: 2px solid var(--color-hover);
  outline-offset: 2px;
}

.new-menu-list a:focus {
  outline: 2px solid var(--color-hover);
  outline-offset: -2px;
}

@media (prefers-reduced-motion: reduce) {
  .new-mobile-header,
  .new-hamburger,
  .new-hamburger span,
  .new-menu-overlay,
  .new-side-menu,
  .new-menu-close,
  .new-menu-list a,
  .new-social-links a {
    transition-duration: 0.01ms !important;
  }
}


.new-mobile-header.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  justify-content: space-between;
  padding: 0 16px;
  display: flex;
  align-items: center;
}
.new-mobile-logo {
  opacity: 0;
  transform: translateY(-10px);
  transition: all var(--transition-speed) ease;
  flex: 1;
  display: flex;
  justify-content: center;
  margin: 0 40px; /* ハンバーガーボタン分の余白 */
}
.new-mobile-header.scrolled .new-mobile-logo {
  opacity: 1;
  transform: translateY(0);
}

