/* ニュース記事ページ用スタイル */
:root {
  --primary: #0f766e;
  --primary-dark: #115e59;
  --accent: #22c55e;
  --bg: #0b1220;
  --panel: #0f172a;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --shadow: 0 12px 30px rgba(0,0,0,.25);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
/* Responsive media handling */
.article-image,
.news-article-image,
.news-card img,
.news-card-image img,
.article-hero-image img,
.featured-image img,
.article-hero img {
    max-width: 100%;
    height: auto;
    display: block;
}

body {
  font-family: 'Segoe UI', 'Hiragino Sans', 'Noto Sans JP', system-ui, -apple-system, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
}

/* Header */
header {
  position: fixed; inset: 0 0 auto 0; z-index: 1000;
  backdrop-filter: blur(10px);
  background: rgba(10,15,28,.6);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
nav { max-width: 1200px; margin: 0 auto; padding: 0.8rem 1.5rem; display: flex; align-items: center; justify-content: space-between; }
.logo { font-weight: 700; letter-spacing: .3px; font-size: 1.2rem; color: #fff; }
.nav-menu { list-style: none; display: flex; gap: 1.4rem; }
.nav-menu a { color: var(--text); text-decoration: none; opacity: .9; position: relative; }
.nav-menu a:hover { color: #fff; }
.nav-menu a::after { content: ''; position: absolute; left: 0; bottom: -6px; width: 0; height: 2px; background: var(--accent); transition: width .25s; }
.nav-menu a:hover::after { width: 100%; }
.mobile-menu-btn { display: none; background: none; border: none; cursor: pointer; padding: .4rem; }
.hamburger-line { width: 24px; height: 3px; background: var(--text); display: block; margin: 3px 0; transition: .2s; }

/* Main content */
main { margin-top: 72px; }

/* News container - 2カラムレイアウト */
.news-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
}

/* Featured image - メイン画像のサイズ制御 */
.featured-image {
  max-height: 350px;
  width: auto;
  max-width: 100%;
  display: block;
  margin: 2rem auto;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

/* 記事ヘッダー */
.article-header {
  background: radial-gradient(1200px 600px at 10% -10%, rgba(34,197,94,.15), transparent 40%),
              radial-gradient(1000px 500px at 90% -20%, rgba(15,118,110,.25), transparent 40%),
              linear-gradient(180deg, #0b1220 0%, #0a0f1c 100%);
  padding: 3rem 1.5rem 2rem;
  text-align: center;
}

.article-header h1 {
  font-size: clamp(1.8rem, 2.5vw, 2.5rem);
  margin-bottom: 1rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.4;
}

.article-meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.article-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.article-hero-image {
  max-width: 1000px;
  margin: 2rem auto 0;
}

.article-hero-image img {
  width: 100%;
  border-radius: 12px;
  box-shadow: var(--shadow);
  display: block;
}

/* 2カラムレイアウト */
.article-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 1024px) {
  .article-container {
    grid-template-columns: 1fr 300px;
  }
}

/* 記事本文 */
.article-content {
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 14px;
  padding: 2rem;
  box-shadow: var(--shadow);
}

.article-content h2 {
  font-size: 1.6rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent);
  color: #fff;
}

.article-content h2:first-child {
  margin-top: 0;
}

.article-content h3 {
  font-size: 1.3rem;
  margin-top: 1.5rem;
  margin-bottom: 0.8rem;
  color: #bbf7d0;
  position: relative;
  padding-left: 1rem;
}

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

.article-content p {
  margin-bottom: 1rem;
  line-height: 1.9;
}

.article-content ul,
.article-content ol {
  margin: 1rem 0 1rem 1.5rem;
  line-height: 1.9;
}

.article-content li {
  margin-bottom: 0.5rem;
}

.article-content a {
  color: #93c5fd;
  text-decoration: none;
  border-bottom: 1px solid rgba(147,197,253,.3);
}

.article-content a:hover {
  color: #bfdbfe;
  border-bottom-color: #bfdbfe;
}

.article-content strong {
  color: #bbf7d0;
  font-weight: 600;
}

.article-content blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  background: rgba(34,197,94,.1);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  color: var(--muted);
  font-style: italic;
}

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

.sidebar-widget {
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 14px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

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

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

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

.sidebar-widget ul li a {
  color: var(--text);
  text-decoration: none;
  display: block;
  padding: 0.5rem;
  border-radius: 6px;
  background: rgba(255,255,255,.02);
  border: 1px solid rgba(255,255,255,.05);
  transition: all .25s;
}

.sidebar-widget ul li a:hover {
  background: rgba(34,197,94,.1);
  border-color: rgba(34,197,94,.3);
  transform: translateX(4px);
}

.sidebar-tag {
  display: inline-block;
  background: rgba(34,197,94,.15);
  color: #bbf7d0;
  border: 1px solid rgba(34,197,94,.4);
  padding: .3rem .7rem;
  border-radius: 6px;
  margin: .3rem;
  font-size: .85rem;
  text-decoration: none;
}

.sidebar-tag:hover {
  background: rgba(34,197,94,.25);
  border-color: rgba(34,197,94,.6);
}

/* カード一覧（index.html用） */
.news-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.news-card {
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .25s, box-shadow .25s;
  text-decoration: none;
  color: var(--text);
  display: block;
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,.35);
  border-color: rgba(34,197,94,.3);
}

.news-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: linear-gradient(135deg, rgba(15,118,110,.3), rgba(34,197,94,.2));
}

.news-card-content {
  padding: 1.5rem;
}

.news-card-date {
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.news-card-title {
  font-size: 1.2rem;
  margin-bottom: 0.8rem;
  color: #fff;
  line-height: 1.4;
}

.news-card-excerpt {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.news-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.news-card-tag {
  background: rgba(34,197,94,.15);
  color: #bbf7d0;
  border: 1px solid rgba(34,197,94,.4);
  padding: .2rem .6rem;
  border-radius: 6px;
  font-size: .8rem;
}

/* Footer */
footer {
  padding: 2rem 1.5rem;
  color: var(--muted);
  border-top: 1px solid rgba(255,255,255,.06);
  background: rgba(10,15,28,.6);
  text-align: center;
}

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

.footer-links a {
  color: var(--text);
  text-decoration: none;
  opacity: .85;
  transition: opacity .25s, color .25s;
}

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

.affiliate-notice {
  font-size: 0.85rem;
  margin-top: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
  /* モバイルで1カラムレイアウトに切り替え */
  .news-container {
    grid-template-columns: 1fr;
  }

  /* サイドナビを本文の上に表示 */
  .sidebar {
    order: -1;
  }
}

@media (max-width: 820px) {
  .nav-menu {
    display: none;
    position: absolute;
    top: 56px;
    right: 12px;
    background: rgba(10,15,28,.95);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 10px;
    padding: .6rem .8rem;
    flex-direction: column;
  }
  .nav-menu.mobile-open { display: flex; }
  .mobile-menu-btn { display: block; }
  .footer-links { gap: 1rem; font-size: 0.9rem; }

  .article-content {
    padding: 1.5rem;
  }

  .news-cards {
    grid-template-columns: 1fr;
  }
}
