:root {
  --primary-color: #00a0dc;
  --secondary-color: #56c02b;
  --accent-color: #fd6925;
  --text-dark: #2c3e50;
  --text-light: #5a6c7d;
  --bg-light: #f8f9fa;
  --bg-white: #ffffff;
  --border-color: #e1e8ed;
  --transition: all 0.3s ease;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.16);
  --gradient-primary: linear-gradient(135deg, #00a0dc 0%, #56c02b 100%);
  --gradient-accent: linear-gradient(135deg, #fd6925 0%, #fbb03b 100%);
}

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

body {
  font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text-dark);
  line-height: 1.7;
  background-color: var(--bg-light);
  overflow-x: hidden;
}

/* Header Styles */
header {
  background: var(--bg-white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: var(--transition);
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: var(--text-dark);
}

.logo-icon {
  width: 50px;
  height: 50px;
  background: var(--gradient-primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: bold;
  color: white;
  box-shadow: var(--shadow-sm);
}

.logo-text h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.logo-text p {
  font-size: 0.85rem;
  color: var(--text-light);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
  max-width: 900px;
  justify-content: center;
}

.nav-item a {
  font-weight: 500;
  color: var(--text-dark);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: var(--transition);
  font-size: 0.95rem;
  white-space: nowrap;
  text-decoration: none;
}

.nav-item a:hover,
.nav-item a.active,
.nav-item.active a {
  background: var(--gradient-primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
}

.hamburger span {
  width: 28px;
  height: 3px;
  background: var(--text-dark);
  border-radius: 2px;
  transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* Hero Section */
.hero {
  position: relative;
  height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 4rem;
}

.hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.5) 100%);
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 900px;
  text-align: center;
  color: white;
  padding: 2rem;
}

.hero-content h1 {
  font-size: 3.8rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  text-shadow: 0 4px 16px rgba(0,0,0,0.6), 0 2px 4px rgba(0,0,0,0.4);
  line-height: 1.3;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

.hero-content p {
  font-size: 1.3rem;
  font-weight: 400;
  margin-bottom: 2rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
  line-height: 1.6;
}

.hero-cta {
  display: inline-flex;
  gap: 1rem;
}

.btn {
  padding: 1rem 2rem;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  box-shadow: var(--shadow-md);
}

.btn-primary {
  background: white;
  color: var(--primary-color);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: transparent;
  color: white;
  border: 2px solid white;
}

.btn-secondary:hover {
  background: white;
  color: var(--primary-color);
}

/* Main Content Layout */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
}

.content-layout {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 3rem;
  margin-top: 3rem;
}

.main-content {
  background: var(--bg-white);
  border-radius: 16px;
  padding: 3rem;
  box-shadow: var(--shadow-sm);
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.sidebar-section {
  background: var(--bg-white);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--primary-color);
}

.sidebar-section h3 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

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

.toc-list li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border-color);
}

.toc-list li:last-child {
  border-bottom: none;
}

.toc-list a {
  color: var(--text-light);
  text-decoration: none;
  font-size: 0.95rem;
  transition: var(--transition);
  display: block;
}

.toc-list a:hover {
  color: var(--primary-color);
  padding-left: 0.5rem;
}

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

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

.related-links a {
  color: var(--primary-color);
  text-decoration: none;
  font-size: 0.95rem;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.related-links a:hover {
  color: var(--secondary-color);
  transform: translateX(5px);
}

.related-links a::before {
  content: "→";
  font-weight: bold;
}

.ad-space {
  background: var(--gradient-accent);
  padding: 3rem 1.5rem;
  border-radius: 12px;
  text-align: center;
  color: white;
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Section Styles */
.section {
  margin-bottom: 4rem;
}

.section h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-dark);
  position: relative;
  padding-bottom: 1rem;
}

.section h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 80px;
  height: 4px;
  background: var(--gradient-primary);
  border-radius: 2px;
}

.section h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 2rem 0 1rem;
  color: var(--text-dark);
}

.section h4 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 1.5rem 0 0.8rem;
  color: var(--text-dark);
}

.section p {
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 1.2rem;
  color: var(--text-light);
}

.section ul,
.section ol {
  margin: 1.5rem 0;
  padding-left: 2rem;
}

.section li {
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 0.8rem;
  color: var(--text-light);
}

/* Card Styles */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.card {
  background: var(--bg-white);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border-top: 4px solid var(--primary-color);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.card-icon {
  width: 60px;
  height: 60px;
  background: var(--gradient-primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 1.8rem;
}

.card h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.card p {
  font-size: 1rem;
  color: var(--text-light);
  line-height: 1.6;
}

/* SVG Diagram Styles */
.diagram-container {
  margin: 3rem 0;
  padding: 2rem;
  background: var(--bg-light);
  border-radius: 16px;
  border: 2px solid var(--border-color);
}

.diagram-container svg {
  width: 100%;
  height: auto;
  display: block;
}

.diagram-title {
  text-align: center;
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--text-dark);
}

/* Highlight Box */
.highlight-box {
  background: linear-gradient(135deg, #e3f2fd 0%, #f1f8e9 100%);
  border-left: 5px solid var(--primary-color);
  border-radius: 12px;
  padding: 2rem;
  margin: 2rem 0;
  box-shadow: var(--shadow-sm);
}

.highlight-box h4 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.highlight-box p {
  color: var(--text-dark);
  margin-bottom: 0.8rem;
}

/* Stats Section */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.stat-card {
  text-align: center;
  padding: 2rem;
  background: var(--bg-white);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.stat-card:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-md);
}

.stat-number {
  font-size: 3rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 1rem;
  color: var(--text-light);
  font-weight: 500;
}

/* News Section */
.news-list {
  list-style: none;
  margin: 2rem 0;
}

.news-item {
  background: var(--bg-white);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border-left: 4px solid var(--secondary-color);
}

.news-item:hover {
  transform: translateX(5px);
  box-shadow: var(--shadow-md);
}

.news-date {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.news-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.news-excerpt {
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.6;
}

/* Footer */
footer {
  background: var(--text-dark);
  color: white;
  padding: 3rem 2rem 2rem;
  margin-top: 4rem;
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 2rem;
}

.footer-section h3 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: var(--secondary-color);
}

.footer-section p,
.footer-section a {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  line-height: 1.8;
  display: block;
  margin-bottom: 0.5rem;
  transition: var(--transition);
}

.footer-section a:hover {
  color: var(--secondary-color);
  padding-left: 0.5rem;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .content-layout {
    grid-template-columns: 1fr;
  }
  
  .sidebar {
    order: -1;
  }
  
  .cards-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }
  
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--bg-white);
    flex-direction: column;
    padding: 6rem 2rem 2rem;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    gap: 0;
    max-width: none;
    align-items: flex-start;
  }
  
  .nav-menu.active {
    right: 0;
  }
  
  .nav-item {
    width: 100%;
    border-bottom: 1px solid var(--border-color);
  }
  
  .nav-item a {
    display: block;
    width: 100%;
    padding: 1rem;
    border-radius: 0;
  }
  
  .hero {
    height: 400px;
  }
  
  .hero-content h1 {
    font-size: 2.2rem;
    line-height: 1.4;
  }

  .hero-content p {
    font-size: 1.05rem;
    line-height: 1.6;
  }
  
  .main-content {
    padding: 2rem 1.5rem;
  }
  
  .container {
    padding: 0 1rem 2rem;
  }
  
  .section h2 {
    font-size: 1.5rem;
  }
  
  .cards-grid {
    grid-template-columns: 1fr;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 480px) {
  .logo-text h1 {
    font-size: 1.2rem;
  }
  
  .logo-icon {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
  
  .hero {
    height: 350px;
  }
  
  .hero-content h1 {
    font-size: 1.75rem;
    line-height: 1.4;
  }

  .hero-content p {
    font-size: 0.95rem;
    line-height: 1.6;
  }
  
  .stat-number {
    font-size: 2rem;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

/* Print Styles */
@media print {
  header,
  .sidebar,
  footer,
  .hero-cta {
    display: none;
  }
  
  .content-layout {
    grid-template-columns: 1fr;
  }
  
  .main-content {
    box-shadow: none;
    padding: 0;
  }
}

/* Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border-width: 0;
}

/* Focus Styles */
a:focus,
button:focus {
  outline: 3px solid var(--primary-color);
  outline-offset: 2px;
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}
