/*
Theme Name: 電波申請ナビ
Theme URI: https://denpa-shinsei.jp
Author: denpa-shinsei
Description: ドローン飛行許可・電波法の行政手続き解説メディア
Version: 1.0.0
Text Domain: denpa-shinsei
*/

/* ============================================
   Gutenberg Block Styles (.entry-content scope)
   Tailwind CDN preflight resets all elements,
   so we re-apply styles within .entry-content.
   ============================================ */

/* --- Headings --- */
.entry-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e3a5f;
  border-bottom: 3px solid #1e3a5f;
  padding-bottom: 0.5rem;
  margin-top: 2.5rem;
  margin-bottom: 1.25rem;
  line-height: 1.4;
}

.entry-content h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e3a5f;
  border-left: 4px solid #2563eb;
  padding-left: 0.75rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.entry-content h4 {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1e293b;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

/* --- Paragraphs --- */
.entry-content p {
  margin-bottom: 1.25rem;
  line-height: 1.8;
  color: #1e293b;
}

/* --- Links --- */
.entry-content a {
  color: #2563eb;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.entry-content a:hover {
  color: #1e3a5f;
}

/* --- Bold --- */
.entry-content strong {
  font-weight: 700;
}

/* --- Lists --- */
.entry-content ul {
  list-style-type: disc;
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.entry-content ol {
  list-style-type: decimal;
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.entry-content li {
  margin-bottom: 0.5rem;
  line-height: 1.8;
  color: #1e293b;
}

.entry-content ul ul,
.entry-content ol ol,
.entry-content ul ol,
.entry-content ol ul {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

/* --- Blockquote --- */
.entry-content blockquote {
  border-left: 4px solid #2563eb;
  background-color: #f8fafc;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  color: #475569;
  font-style: normal;
}

.entry-content blockquote p {
  margin-bottom: 0.5rem;
  color: #475569;
}

.entry-content blockquote p:last-child {
  margin-bottom: 0;
}

/* --- Tables --- */
.entry-content .table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 1.5rem;
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.9375rem;
}

.entry-content thead th {
  background-color: #1e3a5f;
  color: #ffffff;
  font-weight: 700;
  padding: 0.75rem 1rem;
  text-align: left;
  white-space: nowrap;
}

.entry-content tbody td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e2e8f0;
  color: #1e293b;
  vertical-align: top;
}

.entry-content tbody tr:nth-child(even) {
  background-color: #f8fafc;
}

/* --- Code --- */
.entry-content code {
  background-color: #f1f5f9;
  color: #be185d;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-size: 0.875em;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.entry-content pre {
  background-color: #1e293b;
  color: #e2e8f0;
  padding: 1.25rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.entry-content pre code {
  background-color: transparent;
  color: inherit;
  padding: 0;
  font-size: 0.875rem;
}

/* --- Separator --- */
.entry-content hr,
.entry-content .wp-block-separator {
  border: none;
  border-top: 1px solid #e2e8f0;
  margin: 2rem 0;
}

/* --- Images --- */
.entry-content img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  margin: 1rem 0;
}

.entry-content figure {
  margin: 1.5rem 0;
}

.entry-content figcaption {
  font-size: 0.875rem;
  color: #64748b;
  text-align: center;
  margin-top: 0.5rem;
}

/* --- Gutenberg specific blocks --- */
.entry-content .wp-block-quote {
  border-left: 4px solid #2563eb;
  background-color: #f8fafc;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}

.entry-content .wp-block-table {
  margin-bottom: 1.5rem;
  overflow-x: auto;
}

.entry-content .wp-block-columns {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.entry-content .wp-block-column {
  flex: 1;
}

/* ============================================
   Pagination
   ============================================ */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2.5rem;
}

.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.5rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.375rem;
  color: #1e293b;
  text-decoration: none;
  font-size: 0.875rem;
  transition: all 0.2s;
}

.pagination .page-numbers:hover {
  background-color: #f8fafc;
  border-color: #2563eb;
  color: #2563eb;
}

.pagination .page-numbers.current {
  background-color: #1e3a5f;
  border-color: #1e3a5f;
  color: #ffffff;
}

.pagination .page-numbers.dots {
  border: none;
}

/* ============================================
   TOC (Table of Contents)
   ============================================ */
.toc-container {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}

.toc-container .toc-title {
  font-size: 1rem;
  font-weight: 700;
  color: #1e3a5f;
  margin-bottom: 0.75rem;
}

.toc-container ol {
  list-style-type: decimal;
  padding-left: 1.25rem;
  margin: 0;
}

.toc-container li {
  margin-bottom: 0.375rem;
  line-height: 1.6;
}

.toc-container a {
  color: #2563eb;
  text-decoration: none;
  font-size: 0.9375rem;
}

.toc-container a:hover {
  text-decoration: underline;
}

.toc-container ol ol {
  padding-left: 1.25rem;
  margin-top: 0.375rem;
  list-style-type: disc;
}

/* ============================================
   Mobile responsive
   ============================================ */
@media (max-width: 768px) {
  .entry-content h2 {
    font-size: 1.3rem;
  }

  .entry-content h3 {
    font-size: 1.125rem;
  }

  .entry-content table {
    font-size: 0.8125rem;
  }

  .entry-content thead th,
  .entry-content tbody td {
    padding: 0.5rem 0.625rem;
  }

  .entry-content .wp-block-columns {
    flex-direction: column;
  }
}
