/* Lab.Note 専用スタイル */

/* フッターを画面下部に固定するためのレイアウト */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

body > *:not(footer) {
  flex-shrink: 0;
}

.title-header {
  margin: 32px auto 24px auto;
  text-align: center;
}

.title-header img {
  max-width: 320px;
  width: 80vw;
  height: auto;
  display: block;
  margin: 0 auto;
}

.articles-section {
  max-width: 900px;
  margin: 0 auto 32px auto;
  padding: 24px 32px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.articles-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.article-item {
  border-bottom: 1px solid #e0e0e0;
  padding: 20px 0;
  transition: background 0.2s;
}

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

.article-item:hover {
  background: #f9f9f9;
  margin: 0 -16px;
  padding-left: 16px;
  padding-right: 16px;
  border-radius: 8px;
}

.article-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.article-title {
  font-size: 1.4em;
  font-weight: bold;
  margin: 0 0 8px 0;
  color: #222;
  line-height: 1.4;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.article-badge {
  display: inline-block;
  background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
  color: #fff;
  font-size: 0.6em;
  font-weight: bold;
  padding: 4px 10px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 4px rgba(255, 107, 107, 0.3);
}

.article-date {
  font-size: 0.9em;
  color: #666;
  display: block;
}

.no-articles {
  text-align: center;
  padding: 40px 20px;
  color: #666;
  font-size: 1.1em;
}

/* 記事詳細ページ */
.article-detail-section {
  max-width: 900px;
  margin: 32px auto 32px auto;
  padding: 24px 32px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.article-detail {
  line-height: 1.8;
}

.article-detail-title {
  font-size: 2em;
  font-weight: bold;
  margin: 0 0 16px 0;
  color: #222;
  line-height: 1.3;
}

.article-detail-date {
  font-size: 1em;
  color: #666;
  display: block;
  margin-bottom: 32px;
}

.article-detail-body {
  font-size: 1.1em;
  color: #333;
  margin-bottom: 40px;
}

.article-detail-body h1 {
  font-size: 1.8em;
  margin: 32px 0 16px 0;
  color: #222;
  border-bottom: 2px solid #e0e0e0;
  padding-bottom: 8px;
}

.article-detail-body h2 {
  font-size: 1.5em;
  margin: 28px 0 12px 0;
  color: #222;
}

.article-detail-body h3 {
  font-size: 1.3em;
  margin: 24px 0 10px 0;
  color: #222;
}

.article-detail-body p {
  margin: 16px 0;
}

.article-detail-body ul,
.article-detail-body ol {
  margin: 16px 0;
  padding-left: 2em;
  line-height: 1.8;
}

.article-detail-body li {
  margin: 4px 0;
}

.article-detail-body ul ul,
.article-detail-body ol ol,
.article-detail-body ul ol,
.article-detail-body ol ul {
  margin: 8px 0;
}

.article-detail-body a {
  color: #2196f3;
  text-decoration: underline;
}

.article-detail-body a:hover {
  color: #1976d2;
}

.article-detail-body strong {
  font-weight: 800;
  color: #000;
}

.article-detail-body em {
  font-style: italic;
}

.article-detail-body del {
  text-decoration: line-through;
  color: #999;
}

/* 画像のスタイル */
.article-image-container {
  text-align: center;
  margin: 24px 0;
}

.article-image {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.article-detail-body .article-image-container {
  margin: 32px 0;
}

/* タブレット以上のサイズで画像の最大幅を制限 */
@media (min-width: 601px) {
  .article-image {
    max-width: 600px;
    width: 100%;
  }
}

.article-back {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid #e0e0e0;
}

.back-link {
  color: #2196f3;
  text-decoration: none;
  font-size: 1.1em;
  font-weight: bold;
  transition: color 0.2s;
}

.back-link:hover {
  color: #1976d2;
  text-decoration: underline;
}

@media (max-width: 600px) {
  .articles-section {
    margin: 0 4vw 32px 4vw;
    padding: 20px 16px;
  }
  
  .article-detail-section {
    margin: 24px 4vw 32px 4vw;
    padding: 20px 16px;
  }

  .article-title {
    font-size: 1.2em;
  }

  .article-detail-title {
    font-size: 1.6em;
  }

  .article-detail-body {
    font-size: 1em;
  }
}

/* フッター */
footer {
  background: #fff;
  border-top: 1px solid #e0e0e0;
  padding: 24px 16px;
  margin-top: auto;
  text-align: center;
  color: #666;
  font-size: 0.9em;
  flex-shrink: 0;
}

footer p {
  margin: 8px 0;
  line-height: 1.6;
}

footer a {
  color: #222;
  text-decoration: none;
  border-bottom: 1px solid #ccc;
  transition: border-color 0.2s;
}

footer a:hover {
  border-bottom-color: #222;
}

