/* 広告業界サイト専用CSS - 新デザイン */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700&display=swap');

/* CSS変数定義 */
:root {
  --bg-color: #0a192f;
  --text-primary: #e6f1ff;
  --text-secondary: #8892b0;
  --accent: #64ffda;
  --glass: rgba(10, 25, 47, 0.85);
  --card-bg: #112240;
  --card-bg-hover: #1a3356;
  --border-color: #233554;
  --transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
  --max-width: 1200px;
  --header-height: 80px;
}

/* リセット */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
}

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

ul {
  list-style: none;
}

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

/* ヘッダー */
.header {
  position: fixed;
  top: 0;
  width: 100%;
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 5%;
  background-color: var(--glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.header-container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-primary);
}

.logo::after {
  content: 'Hub';
  color: var(--accent);
}

/* ナビゲーション（デスクトップ） */
.nav-desktop {
  display: flex;
  align-items: center;
}

.nav-desktop .nav-menu {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 800px;
}

/* モバイルメニュー */
.nav-mobile {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-color);
  z-index: 999;
  overflow-y: auto;
}

.nav-mobile.active {
  display: block;
}

.nav-mobile .nav-menu {
  display: flex;
  flex-direction: column;
  padding: 20px 30px;
  gap: 0;
}

.nav-mobile .nav-item {
  border-bottom: 1px solid var(--border-color);
}

.nav-mobile .nav-item a {
  display: block;
  padding: 15px 0;
  font-size: 1rem;
}

.nav-item a {
  font-size: 0.85rem;
  color: var(--text-primary);
  position: relative;
  padding: 5px 0;
  white-space: nowrap;
}

.nav-item a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--accent);
  transition: var(--transition);
}

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

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

/* ハンバーガーメニュー */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 10px;
  z-index: 1001;
  margin-left: auto;
}

.hamburger span {
  width: 25px;
  height: 2px;
  background: var(--text-primary);
  margin: 4px 0;
  transition: var(--transition);
  border-radius: 2px;
}

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

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

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

/* メインコンテンツ */
.main {
  margin-top: var(--header-height);
  min-height: calc(100vh - var(--header-height));
}

/* ヒーローセクション */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  padding: 0 10%;
  overflow: hidden;
  background: url('images/hero-bg.png') no-repeat center center/cover;
}

#canvas-bg {
  display: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.hero-subtitle {
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 20px;
  letter-spacing: 2px;
  font-size: 0.9rem;
  opacity: 0;
  animation: fadeUp 0.8s forwards 0.5s;
}

.hero h1 {
  font-size: 3.2rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 30px;
  opacity: 0;
  animation: fadeUp 0.8s forwards 0.7s;
}

.hero p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 600px;
  margin-bottom: 40px;
  opacity: 0;
  animation: fadeUp 0.8s forwards 0.9s;
}

.cta-button {
  display: inline-block;
  padding: 15px 30px;
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: 4px;
  font-weight: 500;
  position: relative;
  overflow: hidden;
  opacity: 0;
  animation: fadeUp 0.8s forwards 1.1s;
  background: transparent;
  cursor: pointer;
}

.cta-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(100, 255, 218, 0.1);
  transition: var(--transition);
}

.cta-button:hover::before {
  left: 0;
}

.cta-button:hover {
  color: var(--accent);
}

/* 統計セクション */
.stats {
  padding: 80px 10%;
  background: #0f2545;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  text-align: center;
}

.stat-item h3 {
  font-size: 3rem;
  color: var(--text-primary);
  font-weight: 700;
  margin-bottom: 10px;
}

.stat-item p {
  color: var(--accent);
  font-size: 0.9rem;
  letter-spacing: 1px;
}

/* コンテナ */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 80px 5%;
}

/* セクションタイトル */
.section-title {
  font-size: 2rem;
  margin-bottom: 50px;
  position: relative;
  display: flex;
  align-items: center;
  color: var(--text-primary);
}

.section-title::after {
  content: '';
  display: block;
  flex: 1;
  max-width: 300px;
  height: 1px;
  background: var(--border-color);
  margin-left: 20px;
}

/* セクション */
.section {
  margin-bottom: 60px;
}

.section h2 {
  font-size: 2rem;
  color: var(--text-primary);
  margin-bottom: 25px;
  position: relative;
  display: flex;
  align-items: center;
}

.section h2::before {
  content: '';
  width: 4px;
  height: 100%;
  background: var(--accent);
  margin-right: 15px;
  border-radius: 2px;
}

.section h3 {
  font-size: 1.5rem;
  color: var(--text-primary);
  margin: 30px 0 15px;
}

.section h4 {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin: 20px 0 10px;
  font-weight: 600;
}

.section p {
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.8;
}

.section ul {
  margin: 20px 0;
  padding-left: 20px;
}

.section li {
  color: var(--text-secondary);
  margin-bottom: 10px;
  position: relative;
  padding-left: 20px;
}

.section li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* 強調テキスト */
.highlight {
  color: var(--accent);
  font-weight: 600;
}

/* 統計ボックス */
.stats-box {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 30px;
  border-radius: 8px;
  margin: 30px 0;
  text-align: center;
  transition: var(--transition);
}

.stats-box:hover {
  border-color: var(--accent);
  box-shadow: 0 10px 30px rgba(100, 255, 218, 0.1);
}

.stats-box h4 {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 15px;
}

.stats-number {
  font-size: 3rem;
  font-weight: 700;
  color: var(--accent);
  display: block;
  margin: 10px 0;
}

.stats-box p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* トピックグリッド */
.topics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

/* トピックカード */
.topic-card {
  background-color: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  top: 0;
  border: 1px solid var(--border-color);
}

.topic-card:hover {
  top: -10px;
  box-shadow: 0 20px 30px rgba(0, 0, 0, 0.3);
  border-color: var(--accent);
}

.topic-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  opacity: 0.8;
  transition: var(--transition);
}

.topic-card:hover img {
  opacity: 1;
}

.topic-content {
  padding: 25px;
}

.topic-title {
  font-size: 1.3rem;
  color: var(--text-primary);
  margin-bottom: 15px;
}

.topic-description {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 20px;
  line-height: 1.6;
}

.topic-link {
  color: var(--accent);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 500;
}

.topic-link:hover {
  gap: 10px;
}

/* カードアイコン */
.card-icon {
  font-size: 2rem;
  margin-bottom: 20px;
  color: var(--accent);
}

/* ニュースセクション */
.news-section {
  padding: 80px 5%;
  background: #0f2545;
}

.news-section h2 {
  font-size: 2rem;
  margin-bottom: 50px;
  position: relative;
  display: flex;
  align-items: center;
  color: var(--text-primary);
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
}

.news-section h2::after {
  content: '';
  display: block;
  flex: 1;
  max-width: 300px;
  height: 1px;
  background: var(--border-color);
  margin-left: 20px;
}

.section-description {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 40px;
  text-align: center;
}

.news-container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
}

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

.news-item:hover {
  transform: translateX(10px);
}

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

.news-date {
  color: var(--text-secondary);
  font-size: 0.85rem;
  display: block;
  margin-bottom: 10px;
}

.news-title {
  font-weight: 500;
  color: var(--text-primary);
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.news-title a {
  color: var(--text-primary);
}

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

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

.news-list {
  display: flex;
  flex-direction: column;
}

.news-list-item {
  padding: 20px 0;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.news-list-item:hover {
  transform: translateX(10px);
}

.news-more-link,
.news-more {
  text-align: center;
  margin-top: 40px;
}

.news-more a {
  color: var(--accent);
  font-weight: 500;
}

.news-more a:hover {
  text-decoration: underline;
}

/* フィーチャードニュース */
.featured-news {
  transition: var(--transition);
}

.featured-news img,
.featured-news .featured-image {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
  opacity: 0.8;
  transition: var(--transition);
  background: linear-gradient(45deg, var(--card-bg), var(--border-color));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

.featured-news:hover img,
.featured-news:hover .featured-image {
  opacity: 1;
}

.featured-tag {
  color: var(--accent);
  font-size: 0.85rem;
  margin-bottom: 10px;
  display: block;
  letter-spacing: 1px;
}

.featured-news h3 {
  font-size: 1.4rem;
  color: var(--text-primary);
  margin-bottom: 15px;
}

.featured-news p {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* コンテンツ画像 */
.content-image {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 8px;
  margin: 30px 0;
  opacity: 0.9;
  transition: var(--transition);
}

.content-image:hover {
  opacity: 1;
}

/* インフォカード */
.info-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 25px;
  margin: 25px 0;
  transition: var(--transition);
}

.info-card:hover {
  border-color: var(--accent);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.info-card h4 {
  color: var(--text-primary);
  margin-bottom: 15px;
}

.info-card p {
  color: var(--text-secondary);
}

/* Amazon広告バナー */
.amazon-banner {
  background: linear-gradient(135deg, rgba(255, 153, 0, 0.2), rgba(255, 184, 77, 0.1));
  border: 1px solid rgba(255, 153, 0, 0.3);
  border-radius: 8px;
  padding: 15px 20px;
  margin: 25px 0;
  text-align: center;
  transition: var(--transition);
}

.amazon-banner:hover {
  border-color: rgba(255, 153, 0, 0.6);
  box-shadow: 0 4px 15px rgba(255, 153, 0, 0.15);
}

.amazon-banner a {
  color: #ffb84d;
  font-weight: 500;
  font-size: 0.95rem;
}

.amazon-banner div {
  padding: 5px 0;
}

/* 本文バナー */
.main-banner {
  background: linear-gradient(135deg, rgba(100, 255, 218, 0.1), rgba(100, 255, 218, 0.05));
  border: 1px solid rgba(100, 255, 218, 0.2);
  border-radius: 8px;
  padding: 15px 20px;
  margin: 25px 0;
  text-align: center;
  transition: var(--transition);
}

.main-banner:hover {
  border-color: rgba(100, 255, 218, 0.4);
  box-shadow: 0 4px 15px rgba(100, 255, 218, 0.1);
}

.main-banner a {
  color: var(--accent);
  font-weight: 500;
}

.main-banner img {
  max-width: 100%;
  height: auto;
}

.main-banner span {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-right: 8px;
}

/* サイドバー広告 */
.sidebar-ad {
  text-align: center;
}

.sidebar-ad img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

.sidebar-ad .amazon-banner {
  padding: 10px;
}

/* フッター */
.footer {
  padding: 60px 5% 30px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-color);
}

.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
}

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

.footer-section h4 {
  color: var(--text-primary);
  margin-bottom: 20px;
  font-size: 1.1rem;
  position: relative;
}

.footer-section h4::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 30px;
  height: 2px;
  background: var(--accent);
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--accent);
  transform: translateX(5px);
  display: inline-block;
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 25px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* アニメーション */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 1s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* 2カラムレイアウト（サブページ用） */
.content-wrapper {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  margin-top: 40px;
}

.main-content {
  background: var(--card-bg);
  border-radius: 8px;
  padding: 40px;
  border: 1px solid var(--border-color);
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.sidebar-section {
  background: var(--card-bg);
  border-radius: 8px;
  padding: 25px;
  border: 1px solid var(--border-color);
}

.sidebar-section h3 {
  color: var(--text-primary);
  margin-bottom: 15px;
  font-size: 1.2rem;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 10px;
}

.sidebar-nav li {
  margin-bottom: 10px;
}

.sidebar-nav a {
  color: var(--text-secondary);
  display: block;
  padding: 10px 12px;
  border-radius: 6px;
  transition: var(--transition);
}

.sidebar-nav a:hover {
  background: rgba(100, 255, 218, 0.1);
  color: var(--accent);
  transform: translateX(5px);
}

/* ページタイトル */
.page-title {
  font-size: 2.5rem;
  color: var(--text-primary);
  margin-bottom: 20px;
  text-align: center;
  line-height: 1.3;
}

/* レスポンシブデザイン */
@media (max-width: 1024px) {
  .nav-menu {
    gap: 15px;
  }

  .nav-item a {
    font-size: 0.8rem;
  }

  .news-container {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

@media (max-width: 768px) {
  .header {
    padding: 0 20px;
  }

  .header-container {
    flex-wrap: nowrap;
  }

  .nav-desktop {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .hero {
    padding: 0 5%;
    height: auto;
    min-height: 100vh;
    padding-top: 100px;
    padding-bottom: 60px;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

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

  .stats {
    padding: 60px 5%;
    gap: 30px;
  }

  .stat-item h3 {
    font-size: 2.2rem;
  }

  .container {
    padding: 60px 5%;
  }

  .topics-grid {
    grid-template-columns: 1fr;
  }

  .content-wrapper {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .sidebar {
    order: -1;
    margin-bottom: 30px;
  }

  .main-content {
    padding: 25px;
  }

  .page-title {
    font-size: 1.8rem;
  }

  .section h2 {
    font-size: 1.5rem;
  }

  .section-title {
    font-size: 1.5rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .section-title::after {
    margin-left: 0;
    width: 100px;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.8rem;
  }

  .stats-number {
    font-size: 2.2rem;
  }

  .stat-item h3 {
    font-size: 1.8rem;
  }

  .main-content {
    padding: 20px;
  }

  .sidebar-section {
    padding: 20px;
  }
}

/* 用語集ページ専用スタイル */
.glossary-item {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 25px;
  margin-bottom: 20px;
  transition: var(--transition);
}

.glossary-item:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(100, 255, 218, 0.1);
}

.glossary-item h3 {
  color: var(--accent);
  font-size: 1.2rem;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

.glossary-item p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 0;
}

.glossary-item:target {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(100, 255, 218, 0.3);
}

@media (max-width: 768px) {
  .glossary-item {
    padding: 20px;
  }

  .glossary-item h3 {
    font-size: 1.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 === */
