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

:root {
  /* Color Palette - Industrial 3D Scanning Theme */
  --primary-color: #0066cc;
  --secondary-color: #2c3e50;
  --accent-color: #00d4ff;
  --highlight-color: #ff9500;
  --text-primary: #1a1a1a;
  --text-secondary: #4a5568;
  --text-light: #718096;
  --bg-light: #f7fafc;
  --bg-white: #ffffff;
  --bg-dark: #1a202c;
  --gradient-primary: linear-gradient(135deg, #0066cc 0%, #0099ff 100%);
  --gradient-dark: linear-gradient(135deg, #2c3e50 0%, #1a252f 100%);
  --gradient-tech: linear-gradient(135deg, #00d4ff 0%, #0066cc 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", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-primary);
  background-color: var(--bg-white);
  overflow-x: hidden;
}

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

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h3 { font-size: clamp(1.4rem, 3vw, 2rem); }
h4 { font-size: clamp(1.1rem, 2.5vw, 1.5rem); }

p {
  margin-bottom: 1.2rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

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.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-md);
  z-index: 1000;
  transition: var(--transition);
}

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

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

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

.logo-sub {
  font-size: 0.7rem;
  color: var(--text-secondary);
  letter-spacing: 0.08em;
  margin-top: -0.2rem;
}

.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.4rem 0.8rem;
  border-radius: 8px;
  transition: var(--transition);
  font-size: 0.9rem;
  white-space: nowrap;
  position: relative;
}

.nav-item a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--gradient-tech);
  transition: width 0.3s ease;
}

.nav-item a:hover::after {
  width: 80%;
}

.nav-item a:hover {
  color: var(--primary-color);
  background-color: rgba(0, 102, 204, 0.05);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  width: 26px;
  height: 3px;
  background: var(--primary-color);
  margin: 3px 0;
  transition: var(--transition);
  border-radius: 3px;
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(0, 102, 204, 0.95) 0%, rgba(44, 62, 80, 0.93) 100%),
              url('images/hero-industrial-3d-scanning.png') center/cover no-repeat;
  color: white;
  text-align: center;
  padding: 8rem 2rem 4rem;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 50%, rgba(0, 212, 255, 0.15) 0%, transparent 60%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  margin-bottom: 1.5rem;
  line-height: 1.2;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.4),
               0 2px 4px rgba(0, 0, 0, 0.3);
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.6rem);
  margin-bottom: 2.5rem;
  opacity: 0.95;
  font-weight: 400;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4),
               0 1px 3px rgba(0, 0, 0, 0.3);
  line-height: 1.6;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  display: block;
  color: var(--accent-color);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.stat-label {
  font-size: clamp(0.85rem, 1.5vw, 1rem);
  opacity: 0.9;
  margin-top: 0.5rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Page Hero (for individual pages) */
.page-hero {
  position: relative;
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(0, 102, 204, 0.92) 0%, rgba(44, 62, 80, 0.9) 100%),
              url('images/page-hero-bg.png') center/cover no-repeat;
  color: white;
  text-align: center;
  padding: 10rem 2rem 4rem;
  margin-bottom: 4rem;
}

.page-hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  margin-bottom: 1rem;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.page-hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.3rem);
  opacity: 0.95;
  max-width: 700px;
  margin: 0 auto;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

/* Breadcrumb */
.breadcrumb {
  padding: 1rem 0;
  margin-top: 80px;
  background-color: var(--bg-light);
}

.breadcrumb-list {
  display: flex;
  list-style: none;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.breadcrumb-list li {
  display: flex;
  align-items: center;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.breadcrumb-list li:not(:last-child)::after {
  content: '›';
  margin-left: 0.5rem;
  color: var(--text-light);
}

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

.breadcrumb-list a:hover {
  text-decoration: underline;
}

/* Section Styles */
.section {
  padding: 5rem 0;
}

.section-alt {
  background-color: var(--bg-light);
}

.section-dark {
  background: var(--gradient-dark);
  color: white;
}

.section-dark h2,
.section-dark h3,
.section-dark p {
  color: white;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--gradient-tech);
  border-radius: 2px;
}

.section-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 700px;
  margin: 1.5rem auto 0;
}

/* Two Column Layout (Main + Sidebar) */
.two-column-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 3rem;
  margin-top: 2rem;
}

.main-content {
  min-width: 0;
}

.sidebar {
  position: sticky;
  top: 100px;
  height: fit-content;
}

/* Content Styling */
.content-block {
  background: white;
  padding: 2.5rem;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  margin-bottom: 2rem;
}

.content-block h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 1.5rem;
  color: var(--secondary-color);
  padding-bottom: 1rem;
  border-bottom: 3px solid var(--primary-color);
}

.content-block h3 {
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.content-block ul,
.content-block ol {
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.content-block li {
  margin-bottom: 0.7rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.content-block strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* Sidebar Components */
.sidebar-widget {
  background: white;
  padding: 1.8rem;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  margin-bottom: 2rem;
}

.sidebar-widget h3 {
  font-size: 1.1rem;
  margin-bottom: 1.2rem;
  color: var(--secondary-color);
  padding-bottom: 0.8rem;
  border-bottom: 2px solid var(--primary-color);
}

.sidebar-widget ul {
  list-style: none;
}

.sidebar-widget li {
  margin-bottom: 0.8rem;
}

.sidebar-widget a {
  color: var(--text-secondary);
  display: block;
  padding: 0.5rem;
  border-radius: 6px;
  transition: var(--transition);
  font-size: 0.95rem;
}

.sidebar-widget a:hover {
  background-color: rgba(0, 102, 204, 0.08);
  color: var(--primary-color);
  padding-left: 1rem;
}

/* Table of Contents */
.toc {
  background: linear-gradient(135deg, rgba(0, 102, 204, 0.05) 0%, rgba(0, 212, 255, 0.05) 100%);
  padding: 1.5rem;
  border-radius: 10px;
  border-left: 4px solid var(--primary-color);
}

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

.toc ul {
  list-style: none;
}

.toc li {
  margin-bottom: 0.6rem;
}

.toc a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  padding-left: 0.5rem;
  border-left: 2px solid transparent;
  transition: var(--transition);
}

.toc a:hover {
  border-left-color: var(--accent-color);
  padding-left: 1rem;
  color: var(--primary-color);
}

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

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

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

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

.news-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.8rem;
}

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

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

.card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

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

.card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
}

.card-content {
  padding: 1.8rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.card-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
  color: var(--text-primary);
}

.card-text {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.2rem;
  flex-grow: 1;
}

.card-link {
  color: var(--primary-color);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
}

.card-link:hover {
  gap: 0.8rem;
}

/* Feature Grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
  margin-top: 3rem;
}

.feature-item {
  text-align: center;
  padding: 2rem;
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

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

.feature-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 1.5rem;
  background: var(--gradient-tech);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: white;
}

.feature-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
  color: var(--text-primary);
}

.feature-text {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* CTA Section */
.cta-section {
  background: var(--gradient-primary);
  color: white;
  text-align: center;
  padding: 5rem 2rem;
  border-radius: 20px;
  margin: 4rem 0;
}

.cta-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: 1rem;
}

.cta-text {
  font-size: clamp(1rem, 2vw, 1.2rem);
  margin-bottom: 2rem;
  opacity: 0.95;
  color: white;
}

.cta-button {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: white;
  color: var(--primary-color);
  font-weight: 700;
  border-radius: 50px;
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl);
  background-color: var(--accent-color);
  color: white;
}

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

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

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

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

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

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

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

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

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

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
}

.footer-copyright {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 1rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .two-column-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .sidebar {
    position: static;
  }

  .nav-menu {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    max-width: 100%;
    height: calc(100vh - 70px);
    background: white;
    flex-direction: column;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    transition: left 0.3s ease;
    overflow-y: auto;
    gap: 0.5rem;
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-toggle {
    display: flex;
  }

  .hero {
    min-height: 70vh;
    padding: 6rem 1.5rem 3rem;
  }

  .hero-stats {
    gap: 2rem;
  }

  .card-grid,
  .feature-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 480px) {
  .nav-container {
    padding: 0.8rem 1rem;
  }

  .section {
    padding: 3rem 0;
  }

  .content-block {
    padding: 1.5rem;
  }

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

/* Utility Classes */
.text-center { text-align: center; }
.text-primary { color: var(--primary-color); }
.text-secondary { color: var(--text-secondary); }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }


/* Auto-added missing selectors */
#+i+dl;f.parentNode.insertBefore(j,f);
    })(window,document, {
    /* Auto-added: missing selector */
}
#main-content {
    /* Auto-added: missing selector */
}


/* === Mobile fix v3 (auto-injected) === */
html, body { overflow-x: hidden; }
img, video, iframe, table { max-width: 100%; }

@media (max-width: 768px) {
  /* ヒーローテキストがviewportからはみ出さないようにする */
  h1, h2, h3 {
    font-size: clamp(1.3rem, 5vw, 2.5rem) !important;
    word-break: break-word;
    overflow-wrap: break-word;
  }
  p, li, td, th, span, a {
    overflow-wrap: break-word;
    word-break: break-word;
  }
  /* 全要素の幅を100vw以内に */
  .container, main, section, article, header, footer, nav,
  [class*="container"], [class*="wrapper"], [class*="content"] {
    max-width: 100vw;
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
  }
}
/* === End Mobile fix v3 === */
