/* 基本レイアウト */
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  background-color: #f5f5f5;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ヘッダー */
.global-header {
  background-color: #333;
  color: #fff;
  padding: 0;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
}

.site-title {
  margin: 0;
  height: 50px;
}

.site-title span {
  color: #fff;
  font-size: 14px;
  display: flex;
  align-items: center;
  padding: 15px 20px;
  font-weight: normal;
}

.site-title a {
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  display: flex;
  align-items: center;
  padding: 15px 20px;
}

.site-title a:hover {
  background: #444;
}

/* グローバルナビゲーション */
.nav-list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  background: #333;
  height: 50px;
}

.nav-item {
  position: relative;
  margin: 0;
  height: 100%;
}

.nav-item a,
.nav-item span {
  display: flex;
  align-items: center;
  color: #fff;
  text-decoration: none;
  padding: 15px 20px;
  cursor: pointer;
  font-size: 14px;
  height: 100%;
  box-sizing: border-box;
}

.nav-item a:hover,
.nav-item span:hover {
  background: #444;
  color: #fff;
}

/* ドロップダウンメニュー */
.has-child .child-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #444;
  min-width: 200px;
  padding: 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  z-index: 1000;
}

.has-child:hover .child-menu {
  display: block;
}

.child-menu li {
  list-style: none;
  border-top: 1px solid #555;
}

.child-menu a {
  padding: 15px 20px;
  color: #fff;
  text-decoration: none;
  display: block;
  font-size: 14px;
  height: auto;
}

.child-menu a:hover {
  background: #555;
}

/* メインコンテンツ */
.main-content {
  padding: 2rem 0;
}

.page-title {
  margin-bottom: 2rem;
  color: #333;
}

/* ツールカード */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.tool-card {
  background: #fff;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tool-card h3 {
  margin: 0 0 1rem;
  font-size: 1.2rem;
  color: #333;
}

.tool-card p {
  margin: 0 0 1rem;
  color: #666;
}

.btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: #4a4a4a;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  transition: background-color 0.3s;
}

.btn:hover {
  background: #666;
}

/* フッター */
.global-footer {
  background-color: #333;
  color: #fff;
  padding: 2rem 0;
  margin-top: 3rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.footer-content {
  text-align: center;
}

/* ハンバーガーメニュー */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  padding: 0;
  width: 30px;
  height: 30px;
  position: relative;
  cursor: pointer;
}

.hamburger {
  display: block;
  width: 20px;
  height: 2px;
  background: #fff;
  position: absolute;
  left: 5px;
  top: 14px;
  transition: all 0.3s;
}

.hamburger::before,
.hamburger::after {
  content: "";
  display: block;
  width: 20px;
  height: 2px;
  background: #fff;
  position: absolute;
  transition: all 0.3s;
}

.hamburger::before {
  top: -6px;
}

.hamburger::after {
  top: 6px;
}

/* メニューオープン時のスタイル */
.menu-open .hamburger {
  background: transparent;
}

.menu-open .hamburger::before {
  transform: rotate(45deg);
  top: 0;
}

.menu-open .hamburger::after {
  transform: rotate(-45deg);
  top: 0;
}

/* レスポンシブ対応を更新 */
@media screen and (max-width: 768px) {
  .header-inner {
    flex-direction: row;
    justify-content: space-between;
    padding: 0 1rem;
    position: relative;
  }

  .menu-toggle {
    display: block;
    z-index: 1001;
  }

  .global-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: #333;
    padding-top: 50px;
    transition: right 0.3s ease;
    z-index: 1000;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.2);
  }

  .menu-open .global-nav {
    right: 0;
  }

  .nav-list {
    flex-direction: column;
    height: auto;
  }

  .nav-item {
    width: 100%;
    border-bottom: 1px solid #444;
  }

  /* 子メニューのスタイルを更新 */
  .has-child > span {
    pointer-events: none; /* クリックを無効化 */
  }

  .has-child .child-menu {
    position: static;
    display: block !important; /* 常に表示 */
    width: 100%;
    box-shadow: none;
    border-top: 1px solid #444;
  }

  .child-menu li {
    background: #444;
  }

  .child-menu a {
    padding-left: 2.5rem;
  }

  /* オーバーレイ */
  .menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
  }

  .menu-open .menu-overlay {
    display: block;
  }
}
