/* 統一されたヘッダーとカーソルエフェクトのスタイル */

/* ヘッダースタイル */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000; /* ヘッダー: 1000-1999 */
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(8px);
  padding: 0.6rem 0;
  opacity: 1;
  transition: opacity 0.3s ease, background 0.3s ease;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* ホームページでのヘッダー初期状態 */
body:has(.about-banner-container) .header {
  opacity: 0;
}

.header.scrolled {
  opacity: 1;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.1);
}

.nav {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
  padding-right: 160px; /* 言語切り替えボタンのスペースをさらに確保 */
}

.nav a {
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  margin-left: 0.8rem;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  pointer-events: auto !important;
  position: relative;
  z-index: 1001; /* ナビゲーションリンク: ヘッダーより上 */
  padding: 0.4rem 0.8rem;
  border-radius: 0.5rem;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.header.scrolled .nav a {
  color: #333;
  text-shadow: none;
}

.nav a:hover {
  background: rgba(255,255,255,0.2);
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
  transform: translateY(-1px);
}

.header.scrolled .nav a:hover {
  background: rgba(0,0,0,0.08);
  color: #000;
  text-shadow: none;
}

.nav a.active {
  color: #fff;
  background: rgba(255,255,255,0.3);
  border: 1px solid rgba(255,255,255,0.4);
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.header.scrolled .nav a.active {
  color: #000;
  background: rgba(0,0,0,0.1);
  border: 1px solid rgba(0,0,0,0.2);
  text-shadow: none;
}

.lab-title {
  font-size: 1.2rem;
  font-weight: 400;
  color: rgba(255,255,255,0.95);
  text-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

.header.scrolled .lab-title {
  color: #222;
  text-shadow: none;
}

/* 言語切替ボタン - ヘッダーの中央右端に配置 */
.lang-switch {
  position: fixed;
  top: calc(0.6rem + 1rem);
  right: 20px;
  transform: translateY(-50%);
  display: flex;
  gap: 0.5rem;
  font-size: 1rem;
  z-index: 2000; /* ドロップダウンメニュー: 2000-2999 */
}

.lang-switch a {
  color: rgba(255,255,255,0.9);
  font-weight: 600;
  padding: 0.3em 1em;
  border-radius: 1.2em;
  background: rgba(255,255,255,0.1);
  transition: all 0.3s ease;
  text-decoration: none;
  letter-spacing: 0.05em;
  border: 1.5px solid rgba(255,255,255,0.2);
  pointer-events: auto !important;
  position: relative;
  z-index: 2001; /* 言語切り替えリンク: 言語切り替えより上 */
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.header.scrolled .lang-switch a {
  color: #333;
  background: rgba(0,0,0,0.05);
  border: 1.5px solid rgba(0,0,0,0.1);
  text-shadow: none;
}

.lang-switch a.active {
  color: #fff;
  background: rgba(255,255,255,0.3);
  border: 1.5px solid rgba(255,255,255,0.4);
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.header.scrolled .lang-switch a.active {
  color: #000;
  background: rgba(0,0,0,0.15);
  border: 1.5px solid rgba(0,0,0,0.2);
  text-shadow: none;
}

.lang-switch a:hover:not(.active) {
  background: rgba(255,255,255,0.2);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.3);
  transform: translateY(-1px);
}

.header.scrolled .lang-switch a:hover:not(.active) {
  background: rgba(0,0,0,0.1);
  color: #000;
  border: 1.5px solid rgba(0,0,0,0.15);
}

/* aboutページのメインビジュアルを中央に配置 */
.main-visual {
  width: 100vw;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-top: 80px;
}

.swiper {
  width: 80vw;
  max-width: 900px;
  border-radius: 2rem;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.swiper-slide img {
  width: 100%;
  height: 50vh;
  object-fit: cover;
  transition: transform 1s cubic-bezier(.075,.82,.165,1);
}

.swiper-slide-active img {
  transform: scale(1.08);
}

.lab-name {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.4rem;
  font-weight: 600;
  color: #2df7f9;
  text-shadow: 0 0 10px rgba(45,247,249,0.3);
}

/* カスタムカーソルエフェクト */
.custom-cursor {
  position: fixed;
  width: 40px;
  height: 40px;
  border: 2px solid #2df7f9;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transition: all 0.1s ease;
  mix-blend-mode: difference;
}

.cursor-trail {
  display: none;
}

.magnetic-field {
  position: fixed;
  width: 80px;
  height: 80px;
  border: 1px solid rgba(45,247,249,0.2);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  opacity: 0;
  transition: all 0.3s ease;
}

.magnetic-field.active {
  opacity: 1;
  transform: scale(1.3);
  border-color: rgba(45,247,249,0.4);
}

/* ホバー時のカーソルエフェクト */
.card:hover ~ .custom-cursor,
.contact-card:hover ~ .custom-cursor,
.photo-item:hover ~ .custom-cursor,
.photo-card:hover ~ .custom-cursor,
.nav a:hover ~ .custom-cursor,
.lang-switch a:hover ~ .custom-cursor,
.link-card:hover ~ .custom-cursor {
  transform: scale(1.5);
  border-color: #fff;
  background: rgba(45,247,249,0.1);
  box-shadow: 0 0 20px rgba(45,247,249,0.5);
}

.card:hover ~ .magnetic-field,
.contact-card:hover ~ .magnetic-field,
.photo-item:hover ~ .magnetic-field,
.photo-card:hover ~ .magnetic-field,
.nav a:hover ~ .magnetic-field,
.lang-switch a:hover ~ .magnetic-field,
.link-card:hover ~ .magnetic-field {
  opacity: 1;
  transform: scale(1.4);
  border-color: rgba(45,247,249,0.5);
}

/* クリック時のエフェクト */
.custom-cursor.clicking {
  transform: scale(0.8);
  border-color: #fff;
  background: rgba(45,247,249,0.3);
}

/* リンク要素では通常のカーソルを表示 */
a, button, input[type="submit"], input[type="button"], .clickable {
  cursor: pointer !important;
  pointer-events: auto !important;
}

/* レスポンシブ対応 */
@media (max-width: 1200px) {
  .nav a {
    margin-left: 1rem;
    font-size: 0.8rem;
  }
  
  .lab-title {
    font-size: 1.1rem;
  }
}

@media (max-width: 1024px) {
  .header {
    padding: 0.4rem 0;
  }
  
  .nav {
    padding: 0 1.5rem;
    padding-right: 140px;
  }
  
  .nav a {
    margin-left: 0.8rem;
    font-size: 0.75rem;
  }
  
  .lab-title {
    font-size: 1rem;
  }
  
  .lang-switch {
    top: calc(0.4rem + 0.8rem);
    right: 15px;
  }
  
  .lang-switch a {
    padding: 0.25em 0.8em;
    font-size: 0.85rem;
  }
}

@media (max-width: 800px) {
  .header {
    padding: 0.3rem 0;
  }
  
  .nav {
    padding: 0 0.3rem !important;
    padding-right: 70px !important;
  }
  
  .nav a {
    margin-left: 0.05rem !important;
    font-size: 0.58rem !important;
    padding: 0.15rem 0.2rem !important;
    letter-spacing: -0.02em !important;
  }
  
  .lab-title {
    font-size: 0.8rem;
  }
  
  .lang-switch {
    top: calc(0.3rem + 0.65rem);
    right: 6px;
  }
  
  .lang-switch a {
    padding: 0.08em 0.4em;
    font-size: 0.65rem;
  }
}

@media (max-width: 600px) {
  .header {
    padding: 0.25rem 0;
  }
  
  .nav {
    padding: 0 0.3rem !important;
    padding-right: 70px !important;
  }
  
  .nav a {
    margin-left: 0.1rem !important;
    font-size: 0.6rem !important;
    padding: 0.15rem 0.25rem !important;
  }
  
  .lab-title {
    font-size: 0.75rem;
  }
  
  .lang-switch {
    top: calc(0.25rem + 0.6rem);
    right: 6px;
  }
  
  .lang-switch a {
    padding: 0.08em 0.4em;
    font-size: 0.65rem;
  }
}

/* モバイルでは通常のカーソルを表示 */
@media (max-width: 768px) {
  .custom-cursor,
  .cursor-trail,
  .magnetic-field {
    display: none;
  }
  
  * {
    cursor: auto !important;
  }
}

.hero h1 {
  font-size: 3rem;
  letter-spacing: 0.2em;
  margin-bottom: 1rem;
  text-shadow: 0 2px 16px #000;
  color: #2df7f9;
  background: none;
  -webkit-background-clip: initial;
  -webkit-text-fill-color: initial;
  background-clip: initial;
}

@media (max-width: 768px) {
  .hero h1 { font-size: 2.2rem; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.6rem; }
} 