/* =====================================================
   RePowera - 共通ナビゲーション / フッター スタイル
   全ページで読み込む共通CSS
   ===================================================== */

/* ---------- VARIABLES ---------- */
:root {
  --white:       #ffffff;
  --off-white:   #fafaf8;
  --light-gray:  #f5f4f0;
  --gray:        #e8e6e0;
  --mid-gray:    #b0aba0;
  --dark-gray:   #6b6660;
  --text:        #1a1816;
  --text-light:  #6b6660;
  --green:       #3d6b4f;
  --green-light: #5a8f6a;
  --green-pale:  #eef4f0;
  --green-dark:  #2a4d38;
  --gold:        #b8963e;
  --transition:  0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ---------- BASE ---------- */
html { scroll-behavior: smooth; }
body {
  font-family: 'Noto Sans JP', sans-serif;
  color: var(--text);
  background: var(--white);
  overflow-x: hidden;
  line-height: 1.8;
}

/* =====================================================
   NAVIGATION BAR — 全ページ常時白背景・黒文字
   ===================================================== */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  background: #ffffff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.3s ease;
}

/* クラスによる変化を無効化 — 常時白で統一 */
#navbar.transparent,
#navbar.solid,
#navbar.scrolled {
  background: #ffffff;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

/* =====================================================
   LOGO LINK WRAP — <a>タグのデフォルトリンク色を完全排除
   ===================================================== */
#navbar a {
  text-decoration: none;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}
#navbar > a {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 0;        /* 余白を消して画像だけ表示 */
}

/* =====================================================
   LOGO — 全ページで元画像のまま表示
   ===================================================== */
.nav-logo {
  height: 50px;          /* 視認しやすいサイズ（40px未満禁止） */
  width: auto;
  max-width: 240px;      /* 横長ロゴが極端に広がるのを防ぐ */
  display: block;
  flex-shrink: 0;
  transition: opacity 0.3s;
  filter: none;
  opacity: 1;
}
.nav-logo:hover { opacity: 0.65; }

/* transparent クラスでも白反転しない */
#navbar.transparent .nav-logo,
#navbar.solid .nav-logo,
#navbar.scrolled .nav-logo {
  filter: none;
  opacity: 1;
}
#navbar.transparent .nav-logo:hover,
#navbar.solid .nav-logo:hover,
#navbar.scrolled .nav-logo:hover {
  opacity: 0.65;
}

/* =====================================================
   NAV LINKS — 右寄せ・横並び・黒文字
   ===================================================== */
.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  margin-left: auto;
  gap: 40px;
  white-space: nowrap;
}

.nav-links a {
  display: inline-block;
  text-decoration: none;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text);
  text-shadow: none;
  transition: color 0.25s, opacity 0.25s;
  line-height: 1;
  padding: 4px 0;
  white-space: nowrap;
}

/* クラスに関わらず常に黒文字 */
#navbar.transparent .nav-links a,
#navbar.solid .nav-links a,
#navbar.scrolled .nav-links a {
  color: var(--text);
  text-shadow: none;
}

.nav-links a:hover { color: var(--green); opacity: 1; }
.nav-links a.active { color: var(--green) !important; }

/* Contact リンク — 他メニューと同デザイン＋グリーンアクセント */
.nav-links .nav-contact a {
  color: var(--green) !important;
  text-decoration: none !important;
}
.nav-links .nav-contact a:hover { opacity: 0.7; }
.mobile-menu .mobile-contact {
  color: var(--green) !important;
  text-decoration: none !important;
  border-bottom: 1px solid var(--gray);
}
.mobile-menu .mobile-contact:hover { color: var(--green-light) !important; }

/* =====================================================
   HAMBURGER (モバイル)
   ===================================================== */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
  margin-left: 20px;
  flex-shrink: 0;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text);
  transition: all 0.3s;
}

/* 全クラスで黒ライン */
#navbar.transparent .hamburger span,
#navbar.solid .hamburger span,
#navbar.scrolled .hamburger span {
  background: var(--text);
  filter: none;
}

.hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* =====================================================
   MOBILE MENU DROPDOWN
   ===================================================== */
.mobile-menu {
  display: none;
  position: fixed;
  top: 80px; left: 0; right: 0;
  background: #ffffff;
  padding: 24px 48px 32px;
  z-index: 999;
  border-top: 1px solid var(--gray);
  box-shadow: 0 8px 24px rgba(0,0,0,0.07);
}
.mobile-menu.open { display: block; }
.mobile-menu a {
  display: block;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--text);
  text-decoration: none;
  text-transform: uppercase;
  padding: 14px 0;
  border-bottom: 1px solid var(--gray);
  transition: color 0.3s;
}
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu a:hover { color: var(--green); }

/* =====================================================
   FOOTER（共通）
   ===================================================== */
footer {
  background: var(--text);
  padding: 80px 0 40px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 48px;
}
.footer-top {
  display: flex;
  justify-content: flex-end;   /* ナビリンクを右寄せ */
  align-items: flex-start;
  padding-bottom: 60px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 40px;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
}
.footer-nav a {
  font-size: 11px;
  letter-spacing: 0.16em;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.3s;
}
.footer-nav a:hover { color: var(--white); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-copy {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.3);
  letter-spacing: 0.1em;
}
/* Contact ブロック — フッター右下 2行構成 */
.footer-contact {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  text-decoration: none !important;
  color: #aaaaaa !important;          /* 青リンク完全上書き */
  -webkit-tap-highlight-color: transparent;
  outline: none;
  line-height: 1.7;
  transition: opacity 0.3s;
}
.footer-contact:hover { opacity: 0.85; }
.footer-contact:hover * { opacity: 1; }

.footer-contact-label {
  display: block;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: #888888 !important;          /* 落ち着いたグレー */
  text-decoration: none !important;
}
.footer-contact-email {
  display: block;
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.07em;
  color: #aaaaaa !important;          /* やや明るいグレー */
  text-decoration: none !important;
}

@media (max-width: 960px) {
  .footer-contact { align-items: center; }
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 960px) {
  #navbar { padding: 0 24px; height: 68px; }
  .nav-logo { height: 44px; max-width: 200px; }
  .nav-links { display: none !important; }
  .hamburger { display: flex; }
  .mobile-menu { top: 68px; padding: 24px 24px 32px; }
  .footer-top { flex-direction: column; gap: 32px; }
  .footer-nav { gap: 20px; }
  .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
}

@media (max-width: 600px) {
  #navbar { padding: 0 16px; height: 64px; }
  .nav-logo { height: 40px; max-width: 180px; }
  .mobile-menu { top: 64px; }
}

/* ===== スマホ専用（768px以下） — 共通 ===== */
@media (max-width: 768px) {
  /* 横スクロール完全防止 */
  html, body { overflow-x: hidden; max-width: 100%; }
  * { box-sizing: border-box; }

  /* ナビゲーション */
  #navbar { padding: 0 16px; height: 64px; }
  .nav-logo { height: 40px; max-width: 180px; }
  .mobile-menu { top: 64px; padding: 20px 20px 28px; }

  /* フッター共通 */
  .footer-inner { padding: 0 20px; }
  .footer-top { flex-direction: column; gap: 24px; }
  .footer-nav { gap: 16px; flex-wrap: wrap; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
  .footer-contact { align-items: center; }
}
