/* AI Solutions News Page Styles */

: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%);
  --border-color: #e2e8f0;
  --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);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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-light);
}

/* 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;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

.nav-menu li {
  white-space: nowrap;
}

.nav-menu a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.nav-menu a:hover {
  color: var(--primary-color);
}

/* Main Content */
main {
  max-width: 900px;
  margin: 150px auto 0;
  padding: 2rem;
}

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

.news-container .main-content {
  background: var(--bg-white);
  padding: 3rem;
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}

.news-container .sidebar {
  position: sticky;
  top: 120px;
  height: fit-content;
}

.news-sidebar {
  background: var(--bg-white);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

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

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

.news-sidebar h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent-color);
}

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

.news-sidebar .related-news li {
  margin-bottom: 0.5rem;
}

.news-sidebar .related-news a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
  display: block;
  padding: 0.5rem;
  border-radius: 4px;
}

.news-sidebar .related-news a:hover {
  background: var(--bg-light);
  text-decoration: underline;
}

/* News Article */
.news-article {
  background: var(--bg-white);
  border-radius: 12px;
  padding: 3rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 3rem;
}

.news-meta {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
}

.news-date,
.news-source {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.news-title {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2rem;
  line-height: 1.3;
}

.news-article-image,
.featured-image {
  width: 100%;
  max-width: 100%;
  max-height: 350px;
  height: auto;
  object-fit: cover;
  margin-bottom: 2.5rem;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  display: block;
}

/* Article Header (blog/news記事のヘッダー構造) */
.article-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.article-title {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  margin-bottom: 1rem;
  line-height: 1.3;
}

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

.article-description {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 0;
}

.article-content {
  margin-top: 2rem;
}

.news-content {
  font-size: 1.05rem;
  line-height: 1.9;
  color: var(--text-primary);
  margin-bottom: 2.5rem;
}

.news-content p {
  margin-bottom: 1.5rem;
}

/* News Source Section */
.news-source-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--border-color);
}

.news-source-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.news-source-list dt {
  font-weight: 700;
  color: var(--primary-color);
  font-size: 0.95rem;
  margin-top: 0.5rem;
}

.news-source-list dt:first-child {
  margin-top: 0;
}

.news-source-list dd {
  margin-left: 0;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.news-source-list a {
  color: var(--primary-color);
  text-decoration: none;
  word-break: break-all;
}

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

/* Header Banner */
.header-banner-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  background: var(--bg-light);
  border-bottom: 1px solid var(--border-color);
}

.header-banner-container .ad-section {
  text-align: center;
}

/* News List Page */
.news-index {
  max-width: 1200px;
  margin: 120px auto 0;
  padding: 2rem;
}

/* ヘッダーバナーがある場合のマージン調整 */
body:has(.header-banner-container) .news-index {
  margin-top: 180px;
}

body:has(.header-banner-container) .news-container {
  margin-top: 180px;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.news-list {
  display: grid;
  gap: 2rem;
  margin-top: 3rem;
}

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

.news-card a {
  display: block;
  text-decoration: none;
  color: inherit;
  width: 100%;
  height: 100%;
}

.news-card a:hover {
  text-decoration: none;
}

.news-card img {
  width: 100%;
  height: auto;
  display: block;
}

.news-card h3 {
  padding: 1.5rem 1.5rem 0.5rem;
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
}

.news-card .date {
  padding: 0 1.5rem;
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.news-card .summary {
  padding: 1rem 1.5rem 1.5rem;
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

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

.news-card-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  background: var(--gradient-primary);
}

.news-card-content {
  padding: 2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

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

.news-card-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.news-card-excerpt {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  flex: 1;
}

.news-card-link {
  display: inline-block;
  padding: 0.7rem 1.3rem;
  background: var(--gradient-primary);
  color: white;
  text-decoration: none;
  border-radius: 6px;
  transition: var(--transition);
  align-self: flex-start;
  font-weight: 600;
}

.news-card-link:hover {
  transform: translateX(5px);
}

/* Section Title */
.section-title {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 3px solid var(--accent-color);
}

/* Footer */
footer {
  background: var(--secondary-color);
  color: white;
  padding: 3rem 2rem 1.5rem;
  margin-top: 5rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

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

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

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

.footer-copyright {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.9rem;
  opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav-container {
    padding: 1rem;
  }

  .nav-menu {
    gap: 1rem;
    font-size: 0.95rem;
  }

  main {
    margin-top: 120px;
    padding: 1rem;
  }

  .news-index {
    margin-top: 120px;
    padding: 1rem;
  }

  body:has(.header-banner-container) .news-index {
    margin-top: 160px;
  }

  body:has(.header-banner-container) .news-container {
    margin-top: 160px;
  }

  .header-banner-container {
    padding: 0.5rem 1rem;
  }

  .news-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  /* News Container - モバイルで1カラムに切り替え */
  .news-container {
    margin-top: 120px;
    padding: 1rem;
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  /* サイドバーをモバイルで本文の上に表示 */
  .news-container .sidebar {
    order: -1;
    position: static;
  }

  .news-article {
    padding: 1.5rem;
  }

  .news-title {
    font-size: 1.5rem;
  }

  .section-title {
    font-size: 1.75rem;
  }

  .news-card-image {
    height: 200px;
  }

  .news-card h3 {
    font-size: 1.1rem;
    padding: 1rem 1rem 0.5rem;
  }

  .news-card .date,
  .news-card .summary {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

@media (max-width: 480px) {
  .nav-logo {
    display: none;
  }

  .nav-menu {
    flex-direction: column;
    gap: 0.5rem;
  }

  main {
    margin-top: 80px;
  }

  .news-article {
    padding: 1rem;
  }

  .news-title {
    font-size: 1.3rem;
  }
}
