:root {
  --primary-color: #6b46c1;
  --secondary-color: #3b82f6;
  --background-color: #f8fafc;
  --surface-color: #ffffff;
  --text-color: #1e293b;
  --text-color-light: #f1f5f9;
  --border-color: #e2e8f0;
  --shadow-color: rgba(0, 0, 0, 0.1);
  --gradient-primary: linear-gradient(135deg, #6b46c1 0%, #3b82f6 100%);
  --gradient-secondary: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%);

  --font-family-base: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
  --font-family-heading: 'Georgia', 'Times New Roman', 'Hiragino Mincho ProN', serif;

  --header-height: 80px;
  --transition-speed: 0.3s;
}

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

body {
  font-family: var(--font-family-base);
  line-height: 1.7;
  color: var(--text-color);
  background-color: var(--background-color);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-heading);
  color: var(--primary-color);
  line-height: 1.3;
  margin-bottom: 1rem;
  font-weight: 600;
}

h1 {
  font-size: 2.5rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h2 {
  font-size: 2rem;
  color: var(--secondary-color);
}

h3 {
  font-size: 1.5rem;
  color: var(--primary-color);
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color var(--transition-speed);
}

a:hover {
  color: var(--secondary-color);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

/* Header */
.header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: box-shadow var(--transition-speed);
}

.header.scrolled {
  box-shadow: 0 4px 20px var(--shadow-color);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: var(--header-height);
}

.logo a {
  font-family: var(--font-family-heading);
  font-size: 1.8rem;
  font-weight: bold;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.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-color);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all var(--transition-speed);
  font-size: 0.9rem;
  white-space: nowrap;
  position: relative;
}

.nav-item a:hover,
.nav-item a.active {
  background: var(--gradient-primary);
  color: var(--text-color-light);
  transform: translateY(-2px);
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 10px;
}

.hamburger-inner,
.hamburger-inner::before,
.hamburger-inner::after {
  width: 25px;
  height: 3px;
  background: var(--primary-color);
  border-radius: 3px;
  transition: var(--transition-speed);
}

.hamburger-inner::before,
.hamburger-inner::after {
  content: '';
  position: absolute;
  left: 0;
}

.hamburger-inner::before {
  transform: translateY(-8px);
}

.hamburger-inner::after {
  transform: translateY(8px);
}

.hamburger.active .hamburger-inner {
  background: transparent;
}

.hamburger.active .hamburger-inner::before {
  transform: rotate(45deg);
}

.hamburger.active .hamburger-inner::after {
  transform: rotate(-45deg);
}

/* Hero Section */
.hero {
  position: relative;
  height: 60vh;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-color-light);
  overflow: hidden;
}

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

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(107, 70, 193, 0.8) 0%, rgba(59, 130, 246, 0.8) 100%);
  z-index: -1;
}

.hero-content {
  max-width: 800px;
  padding: 0 20px;
  z-index: 1;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  color: var(--text-color-light);
  background: none;
  -webkit-text-fill-color: var(--text-color-light);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5), 0 4px 16px rgba(0, 0, 0, 0.3);
}

.hero p {
  font-size: 1.2rem;
  line-height: 1.6;
  margin-bottom: 2rem;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5), 0 3px 12px rgba(0, 0, 0, 0.3);
}

/* Page Layout */
.page-wrapper {
  margin-top: 3rem;
  margin-bottom: 3rem;
}

.main-content {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
  align-items: start;
}

.article-content {
  background: var(--surface-color);
  padding: 3rem;
  border-radius: 12px;
  box-shadow: 0 4px 20px var(--shadow-color);
}

.article-content p {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  line-height: 1.8;
}

.article-content h2 {
  margin-top: 2.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary-color);
}

.article-content h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

/* Feature Grid */
.feature-grid-container {
  margin-top: 3rem;
}

.feature-grid-item {
  background: var(--surface-color);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 2px 10px var(--shadow-color);
  margin-bottom: 2rem;
  border-left: 4px solid var(--primary-color);
  transition: transform var(--transition-speed);
}

.feature-grid-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(107, 70, 193, 0.2);
}

.feature-grid-item h3 {
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.btn-read-more {
  display: inline-block;
  background: var(--gradient-primary);
  color: var(--text-color-light);
  padding: 0.8rem 1.5rem;
  border-radius: 8px;
  font-weight: 500;
  transition: all var(--transition-speed);
  margin-top: 1rem;
}

.btn-read-more:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(107, 70, 193, 0.3);
}

/* Sidebar */
.sidebar {
  position: sticky;
  top: calc(var(--header-height) + 2rem);
}

.sidebar-widget {
  background: var(--surface-color);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 2px 10px var(--shadow-color);
  margin-bottom: 2rem;
}

.sidebar-widget h3 {
  margin-bottom: 1.5rem;
  color: var(--primary-color);
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 0.5rem;
}

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

.news-list li {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.news-list li:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.news-list a {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-color);
  transition: color var(--transition-speed);
}

.news-list a:hover {
  color: var(--primary-color);
}

.ad-space {
  background: var(--gradient-secondary);
  color: var(--text-color-light);
  padding: 3rem 2rem;
  text-align: center;
  border-radius: 8px;
  font-size: 1.2rem;
  font-weight: bold;
}

/* Table of Contents */
.toc {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  margin: 2rem 0;
}

.toc h3 {
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.toc ul {
  list-style: none;
}

.toc ul li {
  margin-bottom: 0.5rem;
}

.toc ul li a {
  color: var(--text-color);
  font-size: 0.9rem;
}

.toc ul li a:hover {
  color: var(--primary-color);
}

/* Footer */
.footer {
  background: var(--primary-color);
  color: var(--text-color-light);
  padding: 3rem 0 2rem;
  margin-top: 4rem;
}

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

.footer-nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.footer-nav a {
  color: var(--text-color-light);
  font-size: 0.9rem;
}

.footer-nav a:hover {
  color: #ddd6fe;
}

.copyright {
  font-size: 0.9rem;
  opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background: var(--surface-color);
    flex-direction: column;
    padding: 2rem 0;
    transform: translateY(-100%);
    transition: transform var(--transition-speed);
    box-shadow: 0 4px 20px var(--shadow-color);
    z-index: 999;
  }

  .nav-menu.active {
    transform: translateY(0);
  }

  .hamburger {
    display: flex;
    position: relative;
  }

  .hero h1 {
    font-size: 2rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5), 0 4px 16px rgba(0, 0, 0, 0.3);
  }

  .hero p {
    font-size: 1rem;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5), 0 3px 12px rgba(0, 0, 0, 0.3);
  }

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

  /* モバイルではサイドバーを先に表示 */
  .sidebar {
    order: -1;
    position: static;
  }

  .article-content {
    order: 0;
    padding: 2rem;
  }

  .feature-grid-item {
    padding: 1.5rem;
  }

  .footer-nav ul {
    flex-direction: column;
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

  .hero {
    height: 50vh;
    min-height: 400px;
  }

  .hero h1 {
    font-size: 1.8rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5), 0 4px 16px rgba(0, 0, 0, 0.3);
  }

  .article-content {
    padding: 1.5rem;
  }

  .sidebar-widget {
    padding: 1.5rem;
  }
}

/* Loading Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* Scroll Animations */
.scroll-fade {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}

.scroll-fade.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Latest News Section */
.latest-news-section {
  margin: 3rem 0;
  padding: 2rem;
  background: var(--surface-color);
  border-radius: 12px;
  box-shadow: 0 2px 10px var(--shadow-color);
}

.latest-news-section h2 {
  margin-top: 0;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 0.5rem;
}

.news-items {
  margin-bottom: 1.5rem;
}

.news-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-color);
  transition: background-color var(--transition-speed);
}

.news-item:last-child {
  border-bottom: none;
}

.news-item:hover {
  background-color: #f8fafc;
  border-radius: 8px;
  padding-left: 1rem;
  padding-right: 1rem;
}

.news-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.news-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-grow: 1;
}

.news-date {
  font-size: 0.85rem;
  color: #888;
  font-weight: 500;
}

.news-link {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-color);
  transition: color var(--transition-speed);
  font-weight: 500;
}

.news-link:hover {
  color: var(--primary-color);
}

.news-more {
  text-align: center;
  padding-top: 1rem;
}

.btn-news-more {
  display: inline-block;
  background: var(--gradient-primary);
  color: var(--text-color-light);
  padding: 0.8rem 2rem;
  border-radius: 8px;
  font-weight: 500;
  transition: all var(--transition-speed);
}

.btn-news-more:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(107, 70, 193, 0.3);
}

@media (max-width: 768px) {
  .latest-news-section {
    padding: 1.5rem;
  }

  .news-item {
    flex-direction: column;
    gap: 0.5rem;
  }

  .news-icon {
    font-size: 1.2rem;
  }
}