/* ヘッダー専用スタイル（共通） */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--header-height);
    transition: all 0.3s ease;
}

/* ヘッダー背景のバリエーション */
.header.header-transparent {
    background: transparent;
}

.header.header-solid {
    background: rgba(var(--white-rgb), 1);
    box-shadow: 0 2px 10px var(--color-black-transparent-10);
}



.header-container {
    margin: 0 auto;
    padding: 0 0;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 24px;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.logo-link:hover {
    opacity: 0.8;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Header Navigation Menu */
.header-nav {
    display: none; /* デフォルトで非表示、JSで制御 */
    align-items: center;
    justify-content: center;
    gap: 6px;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    flex-wrap: nowrap;
    max-width: 95%;
}

/* 1440px以下で2段表示に変更 */
@media (max-width: 1440px) {
    .header-nav {
        flex-wrap: wrap;
        gap: 8px;
        max-width: 90%;
        align-content: center;
    }
}

/* Navigation Item Container */
.nav-item {
    position: relative;
    display: inline-block;
}

.header-nav .nav-item > a {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: normal;
    letter-spacing: 0.08em;
    transition: color 0.3s ease;
    white-space: nowrap;
    padding: 4px 6px;
    display: block;
}

.header-nav .nav-item > a:hover,
.header-nav .nav-item:hover > a {
    color: var(--color-primary);
}

/* Navigation Popup */
.nav-popup {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    width: 100vw;
    background: var(--color-white);
    box-shadow: 0 8px 32px var(--color-black-transparent-30);
    border-radius: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1100;
    overflow: hidden;
}

/* ポップアップの矢印は削除（全幅デザインのため不要） */

/* ホバー時のアニメーション */
.nav-item:hover .nav-popup,
.nav-popup.nav-popup-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}


/* ポップアップコンテンツ */
.nav-popup-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* Navigation Card - 均等配置用 */
.nav-card {
    flex: 1;
    max-width: 380px;
    background: var(--color-white);
    border: none;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    text-decoration: none;
    color: inherit;
    display: block;
    border-radius: 0;
}

.nav-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(230,0,18,0.05) 0%, rgba(230,0,18,0.02) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.nav-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 16px 48px rgba(0,0,0,0.12), 0 8px 24px rgba(230,0,18,0.08);
}

.nav-card:hover::before {
    opacity: 1;
}

/* カード画像エリア */
.nav-card-image {
    height: 120px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.nav-card:hover .nav-card-image img {
    transform: scale(1.05);
}

.nav-card-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary) 0%, #ff6b6b 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.nav-card:hover .nav-card-image::after {
    transform: scaleX(1);
}



/* カードコンテンツ */
.nav-card-content {
    padding: 20px;
    position: relative;
    z-index: 2;
}

.nav-card h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
    line-height: 1.3;
    letter-spacing: 0.02em;
}

.nav-card p {
    margin: 0 0 15px 0;
    font-size: 13px;
    color: var(--color-text-muted);
    line-height: 1.5;
}

.nav-card-link {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    color: var(--color-primary);
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    position: relative;
    padding: 8px 16px;
    border: 1px solid var(--color-primary);
    border-radius: 20px;
    background: transparent;
}

.nav-card-link::after {
    content: '→';
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.nav-card-link:hover {
    background: var(--color-primary);
    color: var(--color-white);
    transform: translateX(2px);
}

.nav-card-link:hover::after {
    transform: translateX(3px);
}

/* People Navigation Popup - 特別なスタイル */
.nav-popup-people {
    max-height: 550px; /* 最大高さを設定 */
}

.nav-popup-people-scroll {
    max-height: 500px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 5px; /* スクロールバーとの間隔 */
}

/* スクロールバーのスタイル */
.nav-popup-people-scroll::-webkit-scrollbar {
    width: 6px;
}

.nav-popup-people-scroll::-webkit-scrollbar-track {
    background: var(--color-gray-lightest);
    border-radius: 3px;
}

.nav-popup-people-scroll::-webkit-scrollbar-thumb {
    background: var(--color-gray);
    border-radius: 3px;
}

.nav-popup-people-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

.nav-popup-people-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 30px;
    max-width: 1000px;
    margin: 0 auto;
}


/* People Card in Navigation - Topページスタイルを適用 */
.nav-popup-people .nav-people-card {
    text-align: left;
    opacity: 1;
    transform: scale(1);
    transition: transform 0.15s ease-out, filter 0.15s ease-out;
    text-decoration: none;
    color: var(--color-text);
    cursor: pointer;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    display: block;
    padding: 0;
}

.nav-popup-people .nav-people-card:hover {
    transform: translateY(-8px) !important;
    filter: brightness(1.1);
    text-decoration: none;
    color: var(--color-text);
    box-shadow: none;
}

.nav-popup-people .nav-people-card::before {
    display: none;
}

.nav-popup-people .nav-people-card-image {
    width: 100%;
    height: 200px;
    margin: 0 0 12px 0;
    overflow: visible;
    box-shadow: 0 6px 15px var(--color-black-transparent-30);
    position: relative;
    background: none;
    display: block;
    border-radius: 0;
}

.nav-popup-people .nav-people-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: none;
}

.nav-popup-people .nav-people-card-image::before {
    content: attr(data-tag);
    background: var(--color-primary);
    color: var(--color-white);
    padding: 6px 10px;
    font-size: 10px;
    font-weight: bold;
    position: absolute;
    top: -15px;
    left: 0;
    z-index: 3;
    white-space: nowrap;
    width: 100px;
    text-align: center;
    box-sizing: border-box;
}

.nav-popup-people .nav-people-card-image::after {
    display: none;
}

/* タグ色の指定はdata-tag-color属性で行う */
.nav-popup-people .nav-people-card-image[data-tag-color="navy"]::before {
    background: var(--color-navy);
}

.nav-popup-people .nav-people-card-image[data-tag-color="primary"]::before {
    background: var(--color-primary);
}

/* 空のタグの場合は非表示 */
.nav-popup-people .nav-people-card-image[data-tag=""]::before {
    display: none;
}

.nav-popup-people .nav-people-card-info {
    color: var(--color-text);
    padding: 0;
    background: transparent;
    position: static;
    z-index: auto;
}

.nav-popup-people .nav-people-position {
    color: var(--color-text);
    font-size: 10px;
    font-weight: normal;
    text-align: left;
    margin-bottom: 4px;
    line-height: 1.3;
}

.nav-popup-people .nav-people-name {
    color: var(--color-text);
    font-size: 13px;
    font-weight: bold;
    text-align: left;
    margin-bottom: 8px;
}

.nav-popup-people .nav-people-separator {
    width: 20px;
    height: 1px;
    background: var(--color-primary);
    margin: 12px 0;
}

.nav-popup-people .nav-people-details {
    padding-top: 0;
    text-align: left;
}

.nav-popup-people .nav-people-details p {
    color: var(--color-text-muted);
    font-size: 10px;
    line-height: 1.5;
    margin-bottom: 3px;
}

/* ナビゲーションメニューの追加調整 */
@media (max-width: 1200px) {
    .header-nav {
        display: none !important;
    }
}

/* レスポンシブ対応 - ナビゲーションポップアップ */
@media (max-width: 1024px) {
    
    .nav-popup-content {
        padding: 30px 15px;
        gap: 15px;
    }
    
    .nav-card-image {
        height: 100px;
    }
    
    .nav-card h3 {
        font-size: 16px;
    }
    
    .nav-popup-people {
        max-height: 450px;
    }
    
    .nav-popup-people-scroll {
        max-height: 400px;
    }
    
    .nav-popup-people-content {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
        padding: 25px;
        max-width: 800px;
    }
    
    .nav-popup-people .nav-people-card-image {
        height: 180px;
    }
}

/* 中間サイズのタブレット対応 */
@media (max-width: 900px) {
    .nav-popup-content {
        flex-direction: column;
        gap: 20px;
        padding: 20px 15px;
        max-width: 100%;
    }
    
    .nav-card {
        max-width: 100%;
    }
    
    .nav-card-image {
        height: 120px;
    }
}

@media (max-width: 768px) {
    /* タブレット・スマホではポップアップを無効化 */
    .nav-popup {
        display: none !important;
    }
    
    .nav-item:hover .nav-popup,
    .nav-popup.nav-popup-visible {
        opacity: 0;
        visibility: hidden;
    }
}

/* Entry Dropdown */
.entry-dropdown { position: static; }

.entry-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 0;
    cursor: pointer;
    max-width: 100%;
    height: auto;
}

.entry-btn-img {
    display: block;
}

/* PC版の画像表示・非表示 */
.entry-btn-img.pc {
    display: block;
    height: auto;
    transition: all 0.3s ease;
}

.entry-btn-img.sp {
    display: none;
    max-width: 100%;
    height: auto;
    transition: all 0.3s ease;
}

.entry-menu {
    position: fixed;
    top: calc(var(--header-height) + 10px);
    left: 0;
    right: 0;
    width: 100vw;
    background: var(--color-black-transparent-80);
    box-shadow: 0 8px 32px var(--color-black-transparent-30);
    border-radius: 0;
    min-height: 280px;
    padding: 90px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.25s ease;
    z-index: 1001;
}

.entry-menu-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 40px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    box-sizing: border-box;
}

/* 噴き出しアロー */
.entry-menu::before {
    content: '';
    position: absolute;
    top: -30px;
    left: var(--entry-arrow-left, 90%);
    transform: translateX(-50%);
    width: 0; height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-bottom: 30px solid rgba(var(--black-rgb), 0.8);
}

.entry-dropdown:hover .entry-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.entry-item { text-align: left; }
.entry-item a { color: inherit; text-decoration: none; display: block; }

.entry-card {
  background: var(--color-primary);
  color: var(--color-white);
  padding: 25px 20px;
  border-radius: 4px;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}
.entry-card:hover { background: var(--color-primary-dark); }
.entry-title { font-weight: bold; font-size: 1.2rem; line-height: 1.3; text-align: center; }

.entry-desc {
  margin-top: 6px;
  font-size: 1.1rem;
  opacity: 0.9;
  line-height: 1.6;
  color: var(--color-white);
  text-align: center;
}

.menu-toggle {
    background: var(--color-black);
    border: none;
    width: 100px;
    height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 0 0 0 25px;
}

.menu-toggle span { width: 36px; height: 2px; background: var(--color-white); transition: all 0.3s; margin: 2px 0px; }
.menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(8px, -10px); }

/* Menu Overlay */
.menu-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(var(--white-rgb), 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 999;
    opacity: 0; visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, backdrop-filter 0.3s ease;
    overflow-y: auto;
}

/* Top red bar */
.menu-overlay::before {
    content: '';
    position: fixed;
    left: 0; right: 0;
    height: 12px;
    background: var(--color-primary);
    z-index: 1;
    top: var(--header-height);
}

.menu-overlay.active { opacity: 1; visibility: visible; }

.menu-content { padding-top: calc(var(--header-height) + 40px); min-height: 100vh; position: relative; z-index: 2; }
.menu-sections {
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.menu-section { padding-bottom: 20px; }
.grid-full { grid-column: 1 / -1; }
.menu-overlay .menu-section-title {
  color: var(--color-primary);
  font-size: 36px;
  font-weight: 900;
  margin-bottom: 0px;
  text-transform: uppercase;
  position: relative;
  text-align: left;
}
.menu-overlay .menu-section-title::after { content: none; }
.menu-overlay .menu-section-subtitle {
  color: var(--color-text-muted);
  font-size: 13px;
  margin-bottom: 16px;
}
.menu-overlay .menu-section-subtitle::after {
  content: '';
  display: block;
  width: auto;
  height: 3px;
  background: var(--color-primary);
  margin-top: 8px;
}
.menu-overlay .section-links { list-style: none; }
.menu-overlay .section-links li { margin-bottom: 10px; line-height: 1.9; }
.menu-overlay .section-links a { color: var(--color-text); text-decoration: none; font-size: 15px; transition: color 0.3s; }
.menu-overlay .section-links a:hover { color: var(--color-primary); }
.menu-overlay .section-links a::before { content: "●"; color: var(--color-primary); margin-right: 10px; font-size: 8px; vertical-align: middle; }

/* PEOPLEセクションのスタイル */
.menu-overlay .people-category {
    margin-bottom: 30px;
}

.menu-overlay .category-label {
    display: inline-block;
    padding: 4px 8px;
    color: var(--color-white);
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 20px;
}

.menu-overlay .category-label.land-based {
    background: var(--color-primary);
}

.menu-overlay .category-label.sea-based {
    background: var(--color-navy-light);
}

.menu-overlay .people-grid { 
    display: grid; 
    grid-template-columns: repeat(5, 1fr); 
    gap: 20px; 
    margin-bottom: 20px;
}

.menu-overlay .people-item { 
    background: transparent; 
    padding: 0; 
    border-radius: 0; 
    position: relative;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.menu-overlay .people-item:hover {
    transform: translateY(-2px);
}

.menu-overlay .people-item:hover .people-name {
    color: var(--color-primary);
}

.menu-overlay .people-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.menu-overlay .people-info::before {
    content: "●";
    color: var(--color-primary);
    font-size: 8px;
    margin-right: 8px;
    position: absolute;
    left: -12px;
    top: 0;
}

.menu-overlay .group-name { 
    font-size: 11px; 
    color: var(--color-text);
    line-height: 1.3;
}

.menu-overlay .team-name { 
    font-size: 11px; 
    color: var(--color-text);
    line-height: 1.3;
}

.menu-overlay .people-name { 
    font-weight: bold; 
    font-size: 13px; 
    color: var(--color-text);
    line-height: 1.3;
}

.menu-tagline { color: var(--color-white); font-size: 32px; font-weight: 800; letter-spacing: 2px; position: relative; z-index: 1; text-align: center; }

/* Bottom red bar - positioned after the last menu section */
.menu-overlay .menu-section:last-child::after {
    content: '';
    position: absolute;
    left: 0; right: 0;
    bottom: 20px;
    height: 12px;
    background: var(--color-primary);
    z-index: 1;
}

/* タブレット版のスタイル（中間サイズ対応） */
@media (max-width: 768px) and (min-width: 577px) {
  .entry-btn-img.pc {
    max-width: 120px; /* PC版画像のサイズを縮小 */
    height: auto;
  }
  
  .header-right {
    gap: 15px;
  }
}

/* スマートフォン版のスタイル */
@media (max-width: 576px) {
  .entry-btn-img.pc {
    display: none;
  }

  .entry-btn-img.sp {
    display: block;
    height: 32px; /* Entryボタンもロゴに合わせて縮小 */
    width: auto;
  }
  
  .entry-btn {
    flex-shrink: 0;
  }
}

/* Responsive - PC版とスマホ版のみ対応 */

/* スマホ版（モバイルデバイス） */
@media (max-width: 576px) {
  .header-container {
    margin: 0 auto;
    padding: 0 20px; /* 左右の余白を増やす */
    justify-content: space-between;
    align-items: center;
  }
  
  .logo {
    margin: 0;
    flex-shrink: 0;
  }
  
  .logo-img {
    max-height: 32px; /* ロゴサイズを少し縮小 */
    width: auto;
  }
  
  .header-right {
    gap: 16px; /* 要素間の間隔を広げる */
    flex-shrink: 0;
    align-items: center;
  }
  
  /* Header Navigation - スマホ版では非表示 */
  .header-nav {
    display: none !important;
  }
  
  /* Entry Menu - フルスクリーン表示 */
  .entry-dropdown:hover .entry-menu {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
  }
  
  .entry-dropdown.active .entry-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  
  .entry-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: var(--color-black-transparent-90);
    padding: calc(var(--header-height) + 20px) 20px 20px 20px;
    min-height: auto;
    z-index: 1001;
  }
  
  .entry-menu::after {
    content: "×";
    position: fixed;
    top: 20px;
    right: 20px;
    color: var(--color-white);
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1002;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--color-white-transparent-10);
    transition: background 0.3s ease;
  }
  
  .entry-menu::after:hover {
    background: var(--color-white-transparent-20);
  }
  
  .entry-menu::before {
    display: none;
  }
  
  .entry-menu-inner { 
    max-width: none;
    grid-template-columns: 1fr; 
    gap: 20px; 
    padding: 20px 0;
    height: auto;
    align-content: center;
    justify-content: center;
    max-height: calc(100vh - var(--header-height) - 80px);
    overflow-y: auto;
  }
  
  .entry-item {
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
  }
  
  .entry-card {
    padding: 30px 25px;
    min-height: 100px;
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
  }
  
  .entry-card:active {
    transform: scale(0.98);
    background: var(--color-primary-dark);
  }
  
  .entry-card::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: var(--color-white-transparent-30);
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
    pointer-events: none;
  }
  
  .entry-card:active::before {
    width: 200px;
    height: 200px;
  }
  
  .entry-title {
    font-size: 1.2rem;
    line-height: 1.3;
    font-weight: bold;
    margin-bottom: 8px;
    text-align: center;
  }
  
  .entry-desc {
    font-size: 1.1rem;
    margin-top: 4px;
    line-height: 1.4;
    opacity: 0.9;
  }
  
  .menu-toggle {
    width: 50px; /* ハンバーガーメニューをさらに縮小 */
    height: 50px;
    border-radius: 0 0 0 0;
  }
  
  .menu-toggle span {
    width: 24px; /* ハンバーガーライン幅も縮小 */
    height: 2px;
  }
  
  /* メニューオーバーレイ */
  .menu-sections { 
    grid-template-columns: 1fr; 
    padding: 30px 15px 40px 15px; 
    gap: 20px; 
  }
  
  .menu-overlay .people-grid { 
    grid-template-columns: 1fr; 
    gap: 10px; 
  }
  
  .menu-tagline { 
    font-size: 20px; 
  }
}