/* =========================
   Base
========================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html,
body {
  overflow-x: hidden;
  margin: 0;
}
a {
  text-decoration: none;
}

/* ===== Header ===== */
:root {
  --navy:        #00167A;
  --navy-dark:   #0D1240;
  --gold:        #C9A84C;
  --gold-light:  #E8C97A;
  --brown:       #5C2E1A;
  --brown-mid:   #8B4513;
  --brown-light: #C47A3A;
  --brown-pale:  #F5EDE4;
  --green:       #1B4D2E;
  --green-mid:   #2D7A4F;
  --green-light: #3A7D58;
  --green-pale:  #E4EDEA;
  --slate:       #2D3348;
  --slate-mid:   #4C5470;
  --slate-light: #7080A8;
  --slate-pale:  #ECEEF5;
  --teal:        #0A4D4D;
  --teal-mid:    #0D6B6B;
  --teal-light:  #2A9090;
  --teal-pale:   #E5EFEF;
  --pdf:         #5C1A30;
  --pdf-mid:     #8B2A4A;
  --pdf-light:   #B03A65;
  --pdf-pale:    #F5E8ED;
  --blue:        #0C3E6B;
  --blue-mid:    #1565A0;
  --blue-light:  #4BA3D4;
  --blue-pale:   #E5EFF7;
  --purple:      #3A0E6B;
  --purple-mid:  #5C1A9B;
  --purple-light:#9B6DD4;
  --purple-pale: #F0EAF8;
  --gray-bg:     #F8F9FA;
  --gray-mid:    #E8EAED;
  --text:        #2C2C2C;
  --text-sub:    #666666;
  --white:       #FFFFFF;
}

header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(13, 18, 64, 0.97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(201, 168, 76, 0.3);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* =========================
   Logo
========================= */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  transition: opacity 0.2s;
}
.logo:hover { opacity: 0.85; }

.logo-icon {
  width: 100px; height: 100px;
  background: transparent;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: bold;
  color: var(--navy);
  line-height: 1.2;
  text-align: center;
  padding: 4px;
}
.logo-text {
  color: var(--white);
  font-size: 18px;
  font-weight: bold;
  letter-spacing: 0.1em;
}
.logo-text span { color: var(--gold); }

.logo-icon img {
  width: 130%;
  height: 130%;
  object-fit: contain;
}

/* =========================
   PC Nav
========================= */
nav { display: flex; align-items: center; gap: 4px; }

nav > a,
.nav-item > .nav-link {
  color: rgba(255,255,255,0.85);
  font-size: 14px;
  padding: 8px 16px;
  border-radius: 4px;
  transition: all 0.2s;
  letter-spacing: 0.05em;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
}

nav > a:hover,
.nav-item > .nav-link:hover { color: var(--gold); background: rgba(201,168,76,0.08); }

nav > a.btn-contact {
  background: var(--gold);
  color: var(--navy-dark);
  font-weight: bold;
  padding: 8px 20px;
  margin-left: 8px;
  border-radius: 4px;
  transition: all 0.2s;
}
nav > a.btn-contact:hover { background: var(--gold-light); color: var(--navy-dark); }

/* =========================
   Dropdown
========================= */
.nav-item { position: relative; }

.nav-link { display: flex; align-items: center; gap: 4px; }

.dropdown {
  display: none;
  position: absolute;
  top: 100%; left: 50%;
  transform: translateX(-50%);
  background: var(--navy-dark);
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: 6px;
  min-width: 210px;
  padding: 12px 0 8px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  z-index: 100;
}

/* ホバーで開く */
.nav-item:hover .dropdown {
  display: block;
}

.dropdown a {
  display: block;
  padding: 10px 20px;
  font-size: 13px;
  color: rgba(255,255,255,0.75);
  white-space: nowrap;
  transition: all 0.15s;
}
.dropdown a:hover { color: var(--gold); background: rgba(201,168,76,0.08); }
.dropdown a::before { content: '›'; color: var(--gold); margin-right: 8px; }

/* =========================
   Hamburger
========================= */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 28px;
  cursor: pointer;
}

/* =========================
   Mobile Menu
========================= */
.mobile-menu {
  display: none;
  flex-direction: column;
  position: absolute;
  top: 60px;
  right: 16px;
  width: 280px;
  background: #0D1240;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  z-index: 999;
}

.mobile-menu.active {
  display: flex;
}

/* =========================
   Mobile Links
========================= */
.mobile-menu a,
.mobile-service-toggle {
  width: 100%;
  display: block;
  color: white;
  background: none;
  border: none;
  text-align: left;
  padding: 14px 0;
  font-size: 15px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  cursor: pointer;
  font-weight: 400;
  letter-spacing: 0;
  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
}

/* 最初の要素に上線 */
.mobile-menu > :first-child {
  border-top: 1px solid rgba(255,255,255,0.1);
}

/* =========================
   Service Menu
========================= */
.mobile-service-menu {
  display: none;
  padding-left: 12px;
  margin-top: 8px;
}

.mobile-service-menu.active {
  display: block;
}

.mobile-service-menu a {
  display: block;
  padding: 10px 0;
  font-size: 14px;
  line-height: 1.6;
  color: white;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

/* =========================
   Contact Button
========================= */
.btn-contact-sp {
  margin-top: 16px;
  background: #C9A84C;
  color: #0D1240 !important;
  text-align: center;
  border-radius: 6px;
  padding: 14px;
  font-weight: bold;
}

/* =========================
   SP
========================= */
@media screen and (max-width: 768px) {
  .logo-text {
    display: none;
  }
  body {
    padding-top: 60px;
  }
  .header-inner {
    height: 60px;
    padding: 0 16px;
  }
  .logo-text {
    font-size: 14px;
  }
  .custom-nav {
    display: none;
  }
  .menu-toggle {
    display: block;
  }
}

/* =========================
   色変更
========================= */
/* 施設予約 */
.page-id-142 .menu-brown-light {
  color: var(--brown-light) !important; 
}

/* ShareBox */
.page-id-88 .menu-green-light {
  color: var(--green-light) !important;
}

/* 総会支援 */
.page-id-171 .menu-slate-light {
  color: var(--slate-light) !important;
}

/* フォーム */
.page-id-154 .menu-teal-light {
  color: var(--teal-light) !important;
}

/* PDF */
.page-id-165 .menu-pdf-light {
  color: var(--pdf-light) !important;
}

/* スマホ検針 */
.page-id-209 .menu-blue-light {
  color: var(--blue-light) !important;
}

/* 電子契約 */
.page-id-211 .menu-purple-light {
  color: var(--purple-light) !important;
}