/* ローカルLLMホスティング・運用代行 スタイルシート */

:root {
  --primary-color: #2563eb;
  --secondary-color: #7c3aed;
  --accent-color: #06b6d4;
  --text-dark: #1e293b;
  --text-light: #64748b;
  --bg-light: #f8fafc;
  --bg-white: #ffffff;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
  --transition: all 0.3s ease;
  --gradient-primary: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  --gradient-accent: linear-gradient(135deg, #06b6d4 0%, #2563eb 100%);
}

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

body {
  font-family: 'Segoe UI', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'メイリオ', Meiryo, sans-serif;
  line-height: 1.8;
  color: var(--text-dark);
  background-color: var(--bg-light);
  font-size: 16px;
}

/* ヘッダー */
header {
  background: var(--gradient-primary);
  color: white;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-md);
}

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

.site-title {
  font-size: 1.5rem;
  font-weight: 700;
  text-decoration: none;
  color: white;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-title:hover {
  opacity: 0.9;
}

/* ナビゲーション */
.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: white;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: var(--transition);
  font-size: 0.95rem;
  white-space: nowrap;
}

.nav-item a:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ハンバーガーメニュー */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: white;
  border-radius: 3px;
  transition: var(--transition);
}

/* ヒーローセクション */
.hero {
  position: relative;
  height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.9) 0%, rgba(124, 58, 237, 0.9) 100%);
}

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

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.85) 0%, rgba(124, 58, 237, 0.85) 100%);
  z-index: 1;
}

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

.hero-content h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-content p {
  font-size: 1.3rem;
  line-height: 1.8;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
}

/* メインコンテンツ */
main {
  max-width: 1400px;
  margin: 3rem auto;
  padding: 0 2rem;
}

.content-wrapper {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 3rem;
}

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

.single-column {
  grid-template-columns: 1fr;
}

.single-column .main-content {
  max-width: 1000px;
  margin: 0 auto;
}

/* サイドバー */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.sidebar-section {
  background: var(--bg-white);
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.sidebar-section h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary-color);
}

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

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

.sidebar-section ul li a {
  color: var(--text-dark);
  text-decoration: none;
  transition: var(--transition);
  display: block;
  padding: 0.3rem 0;
}

.sidebar-section ul li a:hover {
  color: var(--primary-color);
  padding-left: 0.5rem;
}

/* タイトルとセクション */
h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-dark);
  line-height: 1.3;
}

h2 {
  font-size: 2rem;
  font-weight: 700;
  margin: 2.5rem 0 1.5rem;
  color: var(--text-dark);
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--primary-color);
}

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

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

/* テキスト */
p {
  margin-bottom: 1.5rem;
  line-height: 1.9;
  color: var(--text-dark);
}

/* リスト */
ul, ol {
  margin: 1.5rem 0 1.5rem 2rem;
  line-height: 1.9;
}

li {
  margin-bottom: 0.8rem;
  color: var(--text-dark);
}

/* 画像 */
.page-image {
  width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 2rem 0;
  box-shadow: var(--shadow-md);
}

/* ニュースセクション */
.news-section {
  background: var(--bg-white);
  padding: 3rem;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  margin-top: 3rem;
}

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

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

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

.news-item:hover {
  background: var(--bg-light);
  padding-left: 2rem;
}

.news-date {
  display: inline-block;
  background: var(--primary-color);
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-right: 1rem;
}

.news-content {
  display: inline;
  color: var(--text-dark);
  font-size: 1rem;
}

/* カードグリッド */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

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

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

.card h3 {
  margin-top: 0;
  color: var(--primary-color);
}

/* フッター */
footer {
  background: var(--text-dark);
  color: white;
  padding: 3rem 0 1.5rem;
  margin-top: 5rem;
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

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

.footer-links a {
  color: white;
  text-decoration: none;
  transition: var(--transition);
  font-size: 0.95rem;
}

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

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

/* レスポンシブデザイン */
@media (max-width: 1024px) {
  .content-wrapper {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }
}

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background: var(--gradient-primary);
    flex-direction: column;
    padding: 2rem;
    transition: var(--transition);
    overflow-y: auto;
  }

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

  .hamburger {
    display: flex;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .hero-content p {
    font-size: 1.1rem;
  }

  .main-content {
    padding: 2rem 1.5rem;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }
}

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

  main {
    padding: 0 1rem;
  }

  .hero-content h1 {
    font-size: 1.7rem;
  }

  .hero-content p {
    font-size: 1rem;
  }

  .main-content {
    padding: 1.5rem 1rem;
  }
}



/* === 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 === */
