/* ニュースページ専用スタイル */

/* 親スタイルから継承 */
@import url('../styles.css');

/* ニュース記事専用カラーパレット */
.news-article {
  background-color: var(--white);
}

/* ニュース記事ヘッダー */
.news-header {
  background: var(--gradient-primary);
  color: var(--white);
  padding: 8rem 2rem 4rem;
  text-align: center;
  margin-top: 80px;
}

.news-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.3;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.news-meta {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 1.5rem;
  font-size: 0.95rem;
  opacity: 0.9;
}

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

/* メイン画像 */
.news-featured-image {
  width: 100%;
  max-width: 1200px;
  margin: -3rem auto 3rem;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

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

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

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

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

/* 本文スタイル */
.news-content {
  font-size: 1.1rem;
  line-height: 1.9;
  color: var(--text-dark);
}

.news-content h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--secondary-color);
}

.news-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-top: 2rem;
  margin-bottom: 1rem;
}

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

.news-content ul,
.news-content ol {
  margin-bottom: 1.5rem;
  padding-left: 2rem;
}

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

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

.news-content a {
  color: var(--primary-color);
  text-decoration: underline;
  transition: color 0.3s ease;
}

.news-content a:hover {
  color: var(--secondary-color);
}

/* サイドバースタイル */
.sidebar-section {
  background-color: var(--background-light);
  padding: 1.5rem;
  border-radius: 12px;
  margin-bottom: 2rem;
  border: 1px solid rgba(45, 80, 22, 0.1);
}

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

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

.sidebar-list li {
  margin-bottom: 0.75rem;
}

.sidebar-list a {
  color: var(--text-dark);
  text-decoration: none;
  transition: color 0.3s ease;
  display: block;
  padding: 0.5rem;
  border-radius: 6px;
}

.sidebar-list a:hover {
  color: var(--primary-color);
  background-color: rgba(45, 80, 22, 0.05);
}

/* 関連記事カード */
.related-card {
  background-color: var(--white);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 1rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(45, 80, 22, 0.1);
}

.related-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(45, 80, 22, 0.1);
}

.related-card-title {
  font-size: 0.9rem;
  font-weight: 600;
  padding: 1rem;
  color: var(--text-dark);
  line-height: 1.4;
}

/* ニュース一覧ページスタイル */
.news-list-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 8rem 2rem 4rem;
}

.news-list-header {
  text-align: center;
  margin-bottom: 4rem;
}

.news-list-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.news-list-header p {
  font-size: 1.1rem;
  color: var(--text-light);
}

/* ニュースカードグリッド */
.news-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

.news-card {
  background-color: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(45, 80, 22, 0.1);
}

.news-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(45, 80, 22, 0.15);
}

.news-card-image {
  width: 100%;
  height: 220px;
  overflow: hidden;
  background-color: var(--background-light);
}

.news-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.news-card:hover .news-card-image img {
  transform: scale(1.05);
}

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

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

.news-card-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 1rem;
  line-height: 1.4;
}

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

.news-card-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: gap 0.3s ease;
}

.news-card-link:hover {
  gap: 1rem;
  color: var(--secondary-color);
}

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

  .news-sidebar {
    position: static;
  }

  .news-cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

@media (max-width: 768px) {
  .news-header h1 {
    font-size: 1.8rem;
  }

  .news-meta {
    flex-direction: column;
    gap: 0.5rem;
  }

  .news-content {
    font-size: 1rem;
  }

  .news-content h2 {
    font-size: 1.6rem;
  }

  .news-content h3 {
    font-size: 1.3rem;
  }

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

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