/* news-post-content.css - NEWS 記事本文 */

.news-post-content {
  --news-content-text: #475569;
  --news-content-heading: #0f172a;
  --news-content-list-bg: #f1f5f9;
  --news-content-accent: #2563eb;
  max-width: none;
}

.news-post-content > * + * {
  margin-top: 2rem;
}

@media (min-width: 768px) {
  .news-post-content > * + * {
    margin-top: 2.5rem;
  }
}

.news-post-content > :first-child {
  margin-top: 0;
}

.news-post-content > :is(h2, h3) + * {
  margin-top: 0;
}

.news-post-content p,
.news-post-content .wp-block-paragraph {
  color: var(--news-content-text);
  font-size: 0.875rem;
  line-height: 2;
  font-weight: 500;
  margin: 0;
}

@media (min-width: 768px) {
  .news-post-content p,
  .news-post-content .wp-block-paragraph {
    font-size: 1rem;
  }
}

.news-post-content :is(h2, h3, h2.wp-block-heading, h3.wp-block-heading) {
  display: flex;
  align-items: stretch;
  gap: 0.875rem;
  box-sizing: border-box;
  border-left: none;
  padding: 2rem 0 0.75rem;
  margin-top: 0 !important;
  margin-bottom: 2rem !important;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--news-content-heading);
  letter-spacing: -0.025em;
  line-height: 1.375;
}

@media (min-width: 768px) {
  .news-post-content :is(h2, h3, h2.wp-block-heading, h3.wp-block-heading) {
    font-size: 1.5rem;
    margin-bottom: 2.5rem !important;
  }
}

.news-post-content :is(h2, h3, h2.wp-block-heading, h3.wp-block-heading)::before {
  content: '';
  display: block;
  width: 3px;
  background-color: var(--news-content-accent);
  border-radius: 2px;
  flex-shrink: 0;
  align-self: stretch;
}

.news-post-content h4,
.news-post-content h5,
.news-post-content h6 {
  margin: 0;
  font-weight: 700;
  color: var(--news-content-heading);
  letter-spacing: -0.025em;
}

.news-post-content h4 {
  font-size: 1.125rem;
  padding-top: 1.5rem;
  margin-top: 1.5rem !important;
}

.news-post-content :is(ul, ol, ul.wp-block-list, ol.wp-block-list) {
  list-style: none;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  background-color: var(--news-content-list-bg);
  border: 1px solid #f1f5f9;
  border-radius: 2px;
}

@media (min-width: 768px) {
  .news-post-content :is(ul, ol, ul.wp-block-list, ol.wp-block-list) {
    padding: 1.5rem;
  }
}

.news-post-content :is(ul, ol) li,
.news-post-content :is(ul, ol).wp-block-list li {
  display: flex;
  align-items: flex-start;
  font-size: 0.875rem;
  color: #334155;
  line-height: 1.625;
  font-weight: 600;
  margin: 0;
  padding: 0;
}

.news-post-content :is(ul, ol) li + li,
.news-post-content :is(ul, ol).wp-block-list li + li {
  margin-top: 1rem;
}

.news-post-content ul li::before,
.news-post-content ul.wp-block-list li::before {
  content: '✓';
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  margin-right: 0.75rem;
  margin-top: 0.125rem;
  border-radius: 9999px;
  background-color: #dbeafe;
  color: var(--news-content-accent);
  font-size: 10px;
  line-height: 1.25rem;
  text-align: center;
}

.news-post-content ol,
.news-post-content ol.wp-block-list {
  counter-reset: news-ol;
}

.news-post-content ol li,
.news-post-content ol.wp-block-list li {
  counter-increment: news-ol;
}

.news-post-content ol li::before,
.news-post-content ol.wp-block-list li::before {
  content: counter(news-ol);
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  margin-right: 0.75rem;
  margin-top: 0.125rem;
  border-radius: 9999px;
  background-color: #dbeafe;
  color: var(--news-content-accent);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.25rem;
  text-align: center;
}

.news-post-content blockquote,
.news-post-content .wp-block-quote {
  border-left: 4px solid #93c5fd;
  background-color: rgba(239, 246, 255, 0.4);
  padding: 1.5rem;
  margin: 2rem 0;
  border-radius: 0 2px 2px 0;
  font-style: italic;
  font-weight: 600;
  color: #334155;
  line-height: 1.625;
  font-size: 0.875rem;
}

@media (min-width: 768px) {
  .news-post-content blockquote,
  .news-post-content .wp-block-quote {
    font-size: 1rem;
  }
}

.news-post-content blockquote p,
.news-post-content .wp-block-quote p {
  margin: 0;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
  font-weight: inherit;
}

.news-post-content blockquote::before,
.news-post-content blockquote::after,
.news-post-content .wp-block-quote::before,
.news-post-content .wp-block-quote::after {
  content: none !important;
}

.news-post-content a {
  color: var(--news-content-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.news-post-content a:hover {
  color: #1d4ed8;
}

.news-post-content strong {
  font-weight: 700;
  color: var(--news-content-heading);
}

.news-post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 2px;
}

.news-post-content figure {
  margin: 0;
}

.news-post-content figcaption {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: #94a3b8;
  text-align: center;
}

.news-post-content hr,
.news-post-content .wp-block-separator {
  border: none;
  border-top: 1px solid #f1f5f9;
  margin: 2rem 0;
}
