/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Color Palette - AI Solutions Theme */
  --primary-color: #1e40af;
  --secondary-color: #0f172a;
  --accent-color: #3b82f6;
  --text-primary: #1a1a1a;
  --text-secondary: #4a5568;
  --bg-light: #f8fafc;
  --bg-white: #ffffff;
  --gradient-primary: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  --gradient-dark: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
  --shadow-xl: 0 20px 25px rgba(0,0,0,0.15);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Noto Sans JP", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-white);
  overflow-x: hidden;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

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

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

/* Navigation */
.main-nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  z-index: 1000;
  transition: var(--transition);
}

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

.nav-logo {
  display: flex;
  flex-direction: column;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-sub {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav-item a {
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: var(--transition);
}

.nav-item a:hover,
.nav-item a.active {
  background: var(--gradient-primary);
  color: white;
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 0.5rem;
}

.hamburger-inner {
  width: 25px;
  height: 3px;
  background: var(--primary-color);
  margin: 3px 0;
  transition: var(--transition);
}

/* Hero Section */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  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(30, 64, 175, 0.8) 0%, rgba(59, 130, 246, 0.6) 100%);
  z-index: -1;
}

.hero-content {
  text-align: center;
  color: white;
  max-width: 800px;
  padding: 2rem;
  z-index: 1;
}

.hero-content h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero-content p {
  font-size: clamp(1.1rem, 2.5vw, 1.3rem);
  margin-bottom: 2rem;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
  color: rgba(255, 255, 255, 0.95);
}

/* Page Layout */
.page-wrapper {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
  margin-top: 2rem;
  margin-bottom: 4rem;
}

.main-content {
  min-height: 500px;
}

/* Content Sections */
.content-section {
  margin-bottom: 3rem;
  padding: 2rem 0;
}

.content-section:not(:last-child) {
  border-bottom: 1px solid #e2e8f0;
}

/* Overview Grid */
.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.overview-item {
  background: var(--bg-light);
  padding: 2rem;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  text-align: center;
  transition: var(--transition);
}

.overview-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.highlight-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary-color);
  margin: 1rem 0;
}

/* News List */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

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

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

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

.news-item h3 {
  color: var(--primary-color);
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
}

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

.topic-card {
  background: var(--bg-white);
  padding: 2rem;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.topic-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

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

.btn-read-more {
  display: inline-block;
  background: var(--gradient-primary);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  margin-top: 1rem;
  transition: var(--transition);
}

.btn-read-more:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: white;
}

/* Sidebar */
.sidebar {
  background: var(--bg-light);
  padding: 2rem;
  border-radius: 16px;
  height: fit-content;
  position: sticky;
  top: 120px;
}

.sidebar-section {
  margin-bottom: 2rem;
}

.sidebar-section:last-child {
  margin-bottom: 0;
}

.sidebar-section h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

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

.toc-list li,
.related-sites li {
  margin-bottom: 0.5rem;
}

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

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

.ad-section {
  background: var(--gradient-dark);
  color: white;
  padding: 1.5rem;
  border-radius: 12px;
  text-align: center;
}

.ad-placeholder p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
}

/* Article Content */
.article-content {
  background: var(--bg-white);
  padding: 3rem;
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
}

.article-hero {
  margin-bottom: 2rem;
}

.article-hero img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 12px;
}

.article-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.section-content {
  margin-bottom: 2rem;
}

.section-content h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent-color);
}

/* Footer */
.footer {
  background: var(--gradient-dark);
  color: white;
  padding: 3rem 0 1rem;
  margin-top: 4rem;
}

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

.footer-section h4 {
  margin-bottom: 1rem;
  color: white;
}

.footer-section ul {
  list-style: none;
}

.footer-section li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: rgba(255, 255, 255, 0.8);
  transition: var(--transition);
}

.footer-section a:hover {
  color: white;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.7);
}

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

.footer-links a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition);
  padding: 0.5rem 0;
  border-bottom: 1px solid transparent;
}

.footer-links a:hover {
  color: white;
  border-bottom-color: rgba(255, 255, 255, 0.5);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .page-wrapper {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .sidebar {
    position: static;
  }
}

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 80px;
    left: -100%;
    flex-direction: column;
    background: white;
    width: 100%;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
  }
  
  .nav-menu.active {
    left: 0;
  }
  
  .hamburger {
    display: flex;
  }
  
  .hamburger.active .hamburger-inner {
    transform: rotate(45deg);
  }
  
  .hamburger.active .hamburger-inner::before {
    transform: rotate(90deg) translate(-3px, -3px);
  }
  
  .hamburger.active .hamburger-inner::after {
    opacity: 0;
  }
  
  .overview-grid {
    grid-template-columns: 1fr;
  }
  
  .topics-grid {
    grid-template-columns: 1fr;
  }
  
  .article-content {
    padding: 2rem 1.5rem;
  }
  
  .container {
    padding: 0 15px;
  }

  .footer-links {
    gap: 1rem;
  }

  .footer-links a {
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .nav-container {
    padding: 1rem;
  }
  
  .hero-content {
    padding: 1rem;
  }
  
  .article-content {
    padding: 1.5rem 1rem;
  }

  .footer-links {
    gap: 0.75rem;
    flex-direction: column;
  }

  .footer-links a {
    font-size: 0.8rem;
  }
}