/* 記事ページ全体のフォント設定 */
body {
  font-family: "Noto Sans JP", "Roboto", sans-serif;
}

main {
  font-weight: 400;
}

/* Richtext paragraph styling */
.richtext p {
  margin-bottom: 1rem;
}

.richtext p:last-child {
  margin-bottom: 0;
}

/* Richtext link styling */
.richtext a {
  color: #000; /* black */
  text-decoration: underline;
}

.richtext a:hover {
  color: #495057; /* gray-700 */
}

/* Details/Summary styling for JavaScript-free expand/collapse */

/* Remove default arrow */
details summary {
  list-style: none;
}

details summary::-webkit-details-marker {
  display: none;
}

/* Icon rotation animation for details */
details[open] .details-icon {
  transform: rotate(180deg);
}

.details-icon {
  transition: transform 0.2s ease-in-out;
}

/* Content height and gradient control */
.details-content {
  height: 3.5rem; /* h-14 equivalent */
  overflow: hidden;
  position: relative;
}

.details-content::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 1.5rem;
  width: 100%;
  background: linear-gradient(to top, white, transparent);
}

/* When details is open, remove height restriction and gradient */
details[open] .details-content {
  height: auto;
}

details[open] .details-content::after {
  display: none;
}

/* Button text styling */
details summary .summary-text::after {
  content: '続きを見る';
}

details[open] summary .summary-text::after {
  content: '閉じる';
}
