:root {
  --primary-color: #2D3E50;
  --secondary-color: #E67E22;
  --bg-color: #F8F9FA;
  --text-color: #333333;
  --text-dark: #1A1A1A;
  --nav-bg: #FFFFFF;
  --border-color: #E0E0E0;
  --transition: all 0.3s ease;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
}

/* Header & Nav */
header {
  background-color: var(--nav-bg);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary-color);
  text-decoration: none;
  margin-bottom: 1rem;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;           /* 2行レイアウト対応 */
  max-width: 900px;          /* ナビゲーション全体の最大幅制限 */
  justify-content: center;   /* メニュー項目を中央配置 */
}

.nav-item a {
  font-weight: 500;
  color: var(--text-dark);
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  text-decoration: none;
  transition: var(--transition);
  font-size: 0.9rem;         /* 適切なフォントサイズ */
  white-space: nowrap;       /* 項目内の改行を防止 */
}

.nav-item a:hover {
  background-color: var(--primary-color);
  color: #fff;
}

.hamburger {
  display: none;
  cursor: pointer;
  font-size: 1.5rem;
}

/* Hero Section */
.hero {
  position: relative;
  height: 60vh;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-size: cover;
  background-position: center;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 2rem;
  max-width: 800px;
}

.hero h1 {
  font-size: 3rem;
  color: #FFFFFF;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
  -webkit-text-stroke: 1px rgba(0,0,0,0.5);
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.2rem;
  color: #FFFFFF;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 2rem;
}

.main-layout {
  display: flex;
  gap: 2rem;
}

.main-content {
  flex: 1;
  background: #FFFFFF;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.sidebar {
  width: 300px;
  flex-shrink: 0;
}

/* Typography */
h2 {
  font-size: 1.8rem;
  color: var(--primary-color);
  border-bottom: 2px solid var(--secondary-color);
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
  margin-top: 2rem;
}

h3 {
  font-size: 1.4rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  margin-top: 1.5rem;
}

p {
  margin-bottom: 1.5rem;
}

/* News List */
.news-section {
  background: #FFFFFF;
  padding: 2rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.news-list {
  list-style: none;
}

.news-item {
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
}

.news-date {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 0.5rem;
  display: block;
}

.news-title {
  font-weight: bold;
  color: var(--primary-color);
}

/* Sidebar Elements */
.sidebar-widget {
  background: #FFFFFF;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  margin-bottom: 2rem;
}

.sidebar-widget h3 {
  margin-top: 0;
  font-size: 1.2rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.toc-list, .related-links {
  list-style: none;
}

.toc-list li, .related-links li {
  margin-bottom: 0.8rem;
}

.toc-list a, .related-links a {
  color: var(--text-color);
  text-decoration: none;
  font-size: 0.95rem;
  transition: var(--transition);
}

.toc-list a:hover, .related-links a:hover {
  color: var(--secondary-color);
}

/* Banners */
.banner-container {
  margin: 2rem 0;
  text-align: center;
}

/* Footer */
footer {
  background-color: var(--primary-color);
  color: #FFFFFF;
  padding: 3rem 2rem;
  text-align: center;
  margin-top: 4rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.footer-links a {
  color: #FFFFFF;
  text-decoration: none;
  font-size: 0.9rem;
  opacity: 0.8;
  transition: var(--transition);
}

.footer-links a:hover {
  opacity: 1;
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
  .hamburger {
    display: block;
    position: absolute;
    right: 2rem;
    top: 1.5rem;
  }
  
  .nav-menu {
    display: none;
    flex-direction: column;
    width: 100%;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--nav-bg);
    padding: 1rem 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  }
  
  .nav-menu.active {
    display: flex;
  }
  
  .main-layout {
    flex-direction: column;
  }
  
  .sidebar {
    width: 100%;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
}
