/* トップバー */
.top-bar {
  background-color: #f5f5f5;
  color: var(--text-color);
  padding: 5px 0;
  font-size: 0.9em;
  border-bottom: 1px solid var(--border-color);
  margin: 0;
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-bar-left span {
  margin-right: 20px;
  display: inline-flex;
  align-items: center;
}

.top-bar-left i {
  margin-right: 8px;
  color: var(--primary-color);
}

.social-links a {
  color: var(--light-text);
  margin-left: 15px;
  transition: color 0.3s;
  font-size: 1.1em;
}

.social-links a:hover {
  color: var(--primary-color);
}

/* ヘッダー */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  margin-top: 0;
  padding-top: 0;
  height: var(--header-height);
  display: flex;
  align-items: center;
}

.header-wrapper {
  background: var(--light-background);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  position: relative;
  margin-top: 0;
  padding-top: 0;
  height: var(--header-height);
  width: 100%;
  display: flex;
  align-items: center;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  margin: 0;
  padding: 0;
  width: 100%;
}

.site-branding {
  display: flex;
  align-items: center;
  height: 100%;
  padding-left: 25px;
}

.logo-container {
  display: flex;
  align-items: center;
  height: 100%;
}

.custom-logo-link {
  display: block;
}

.custom-logo {
  max-width: 100%;
  height: 42px;
  max-height: 100%;
  width: 190px;
}

/* サイトタイトルと説明文を非表示 */
.site-title,
.site-description {
  display: none;
}

.header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  padding-right: 60px;
}

/* ヘッダーナビゲーション */
.header-navigation {
  margin-right: 20px;
  height: 100%;
  display: flex;
  align-items: center;
}

.header-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  height: 100%;
  align-items: center;
}

.header-menu li {
  margin: 0;
  padding: 0;
  margin-left: 24px;
  height: 100%;
  display: flex;
  align-items: center;
}

.header-menu li:first-child {
  margin-left: 0;
}

.header-menu a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100px;
  text-align: center;
  height: 100%;
  color: var(--text-color);
  text-decoration: none;
  font-size: 18px;
  font-weight: 600;
  transition: color 0.3s;
  padding: 0;
  position: relative;
  top: 0;
}

.header-menu a:hover {
  color: var(--primary-color);
}

/* メニュートグルボタン（モバイル用） */
.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 10px;
  align-self: center;
}

.menu-icon {
  display: block;
  position: relative;
  width: 24px;
  height: 2px;
  background-color: var(--text-color);
  transition: background-color 0.3s;
}

.menu-icon::before,
.menu-icon::after {
  content: "";
  position: absolute;
  width: 24px;
  height: 2px;
  background-color: var(--text-color);
  transition: transform 0.3s;
}

.menu-icon::before {
  top: -8px;
}

.menu-icon::after {
  bottom: -8px;
}

.menu-toggle[aria-expanded="true"] .menu-icon {
  background-color: transparent;
}

.menu-toggle[aria-expanded="true"] .menu-icon::before {
  transform: rotate(45deg);
  top: 0;
}

.menu-toggle[aria-expanded="true"] .menu-icon::after {
  transform: rotate(-45deg);
  bottom: 0;
}

/* ナビゲーション */
.main-navigation {
  background-color: var(--light-background);
  padding: 0;
  border-top: 1px solid var(--border-color);
}

.primary-menu-container {
  width: 100%;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: flex-start;
}

nav li {
  position: relative;
  margin: 0;
}

nav a {
  display: block;
  padding: 15px 20px;
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s;
}

nav a:hover {
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--primary-color);
}

/* サブメニュー */
.sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--light-background);
  min-width: 200px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  z-index: 999;
}

.sub-menu li {
  width: 100%;
}

.sub-menu a {
  padding: 12px 20px;
}

nav li:hover > .sub-menu {
  display: block;
}

/* モバイルメニュー */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 9999;
  overflow-y: auto;
  padding: 60px 20px 40px;
  transform: translateX(100%);
  transition: transform 0.3s ease-in-out;
}

.mobile-menu.active {
  display: block;
  transform: translateX(0);
}

.mobile-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mobile-menu li {
  margin: 0;
  padding: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  width: 100%;
  text-align: center;
}

.mobile-menu a {
  display: block;
  padding: 15px 0;
  color: #fff;
  text-decoration: none;
  font-size: 1.1rem;
  transition: color 0.3s;
  text-align: center;
}

.mobile-menu a:hover {
  color: var(--primary-color);
}

body.mobile-menu-open {
  overflow: hidden;
}

/* ヘッダー固定時のコンテンツ調整 */
body {
  padding-top: var(--header-height);
}

/* ドロップダウンメニュー */
.header-menu .has-dropdown {
  position: relative;
}

.header-menu .dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 180px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  border-radius: 6px;
  padding: 12px 0;
  z-index: 2000;
}

.header-menu .has-dropdown:hover > .dropdown-menu {
  display: block;
}

.header-menu .dropdown-menu li {
  margin: 0;
  padding: 0;
  display: block;
  height: auto;
}

.header-menu .dropdown-menu a {
  display: block;
  width: 100%;
  padding: 10px 24px;
  color: var(--text-color);
  background: none;
  font-size: 16px;
  font-weight: 500;
  text-align: left;
  border: none;
  transition: background 0.2s, color 0.2s;
}

.header-menu .dropdown-menu a:hover {
  background: var(--primary-color);
  color: #fff;
}
