/* ==============================================
   TRINITY URAWA Blog — Common Article Styles
   ============================================== */

/* Reset & Base */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: "Noto Sans JP", sans-serif; color: #333; line-height: 1.8; background: #fff; }
a { text-decoration: none; color: #B87333; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: "Montserrat", "Noto Sans JP", sans-serif; }

/* Header */
.header { background: #fff; border-bottom: 1px solid #f0f0f0; position: sticky; top: 0; z-index: 100; }
.header-inner { max-width: 1100px; margin: 0 auto; padding: 0.8rem 2rem; display: flex; align-items: center; justify-content: space-between; }
.logo { font-family: "Montserrat", sans-serif; font-size: 1.2rem; font-weight: 800; color: #222; letter-spacing: 0.08em; text-decoration: none; }
.logo span { color: #B87333; }
.header-nav a { font-size: 0.82rem; color: #555; margin-left: 1.5rem; text-decoration: none; }
.header-nav a:hover { color: #B87333; text-decoration: none; }

/* Breadcrumb */
.breadcrumb { max-width: 780px; margin: 0 auto; padding: 1rem 2rem 0; font-size: 0.78rem; color: #888; }
.breadcrumb a { color: #888; text-decoration: none; }
.breadcrumb a:hover { color: #B87333; }
.breadcrumb span { margin: 0 0.4rem; }

/* Article Header */
.article-header { background: #fafafa; padding: 3rem 2rem; text-align: center; }
.article-header .date { font-size: 0.78rem; color: #B87333; font-weight: 600; letter-spacing: 0.05em; }
.article-header .tag { display: inline-block; font-size: 0.7rem; color: #fff; background: #B87333; padding: 0.15rem 0.6rem; border-radius: 4px; margin-left: 0.5rem; }
.article-header h1 { font-size: 1.5rem; font-weight: 700; color: #222; margin-top: 0.8rem; line-height: 1.5; }

/* TOC */
.toc { max-width: 780px; margin: 0 auto; padding: 2rem 2rem 0; }
.toc-box { background: #faf8f5; border: 1px solid #e8e0d0; border-radius: 8px; padding: 1.5rem 2rem; }
.toc-box h2 { font-size: 0.9rem; font-weight: 700; color: #B87333; margin-bottom: 0.8rem; border: none; padding: 0; }
.toc-box ol { margin: 0; padding-left: 1.2rem; }
.toc-box li { font-size: 0.85rem; color: #555; margin-bottom: 0.4rem; line-height: 1.6; }
.toc-box a { color: #444; text-decoration: none; }
.toc-box a:hover { color: #B87333; }

/* Article Body */
.article-body { max-width: 780px; margin: 0 auto; padding: 2rem 2rem 3rem; }
.article-body h2 { font-size: 1.2rem; font-weight: 700; color: #222; margin: 2.5rem 0 1rem; padding-bottom: 0.5rem; border-bottom: 2px solid #B87333; }
.article-body h3 { font-size: 1.05rem; font-weight: 700; color: #333; margin: 2rem 0 0.8rem; }
.article-body p { font-size: 0.92rem; color: #444; margin-bottom: 1.2rem; line-height: 2; }
.article-body ul, .article-body ol { margin: 0.8rem 0 1.5rem 1.5rem; }
.article-body li { font-size: 0.92rem; color: #444; margin-bottom: 0.5rem; line-height: 1.8; }
.article-body strong { color: #222; }

/* ---- Highlight Box ---- */
.highlight {
  background: #f8f5f0;
  border-left: 5px solid #B87333;
  padding: 1.5rem 1.8rem;
  margin: 1.5rem 0;
  border-radius: 0 8px 8px 0;
}
.highlight p { margin-bottom: 0.5rem; }
.highlight p:last-child { margin-bottom: 0; }

/* ---- Diagram (SVG Container) ---- */
.diagram {
  margin: 2rem 0;
  padding: 2.5rem 2rem;
  background: #fafafa;
  border-radius: 12px;
  border: 1px solid #e0dcd4;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.diagram-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #B87333;
  text-align: center;
  margin-bottom: 1.5rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid #ece8e0;
  letter-spacing: 0.05em;
}

/* ---- Comparison Table ---- */
.compare-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.88rem;
  margin: 1.5rem 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e0dcd4;
}
.compare-table th {
  background: #3b3b3b;
  color: #fff;
  padding: 0.85rem 1.2rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.84rem;
}
.compare-table td {
  padding: 0.85rem 1.2rem;
  border-bottom: 1px solid #eee;
  color: #444;
}
.compare-table tbody tr:nth-child(even) { background: #faf8f5; }
.compare-table tr:hover { background: #f5f0ea; }
.compare-table .label-col {
  font-weight: 600;
  color: #222;
  white-space: nowrap;
  width: 30%;
  background: #fafafa;
}
.compare-table tbody tr:nth-child(even) .label-col { background: #f5f0ea; }

/* ---- Flow Diagram ---- */
.flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
  margin: 1.5rem 0;
}
.flow-step {
  background: #fff;
  border: 2px solid #B87333;
  border-radius: 10px;
  padding: 1.2rem 1.4rem;
  text-align: center;
  min-width: 155px;
  flex: 1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}
.flow-step .step-num {
  font-family: "Montserrat", sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  color: #B87333;
  letter-spacing: 0.1em;
}
.flow-step .step-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #222;
  margin: 0.3rem 0;
}
.flow-step .step-desc {
  font-size: 0.75rem;
  color: #666;
  line-height: 1.5;
}
.flow-arrow {
  font-size: 1.5rem;
  color: #B87333;
  padding: 0 0.3rem;
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #faf5ef;
  border-radius: 50%;
}

/* ---- Anatomy SVG ---- */
.anatomy-figure { text-align: center; margin: 2rem 0; }
.anatomy-figure svg { max-width: 100%; height: auto; }

/* ---- Anatomy Caption ---- */
.anatomy-caption {
  font-size: 0.8rem;
  color: #888;
  margin-top: 0.8rem;
  text-align: center;
  font-style: italic;
}

/* ---- Muscle Layer Cards ---- */
.muscle-layers {
  display: flex;
  gap: 1rem;
  margin: 1.5rem 0;
  flex-wrap: wrap;
}
.muscle-layer {
  flex: 1;
  min-width: 200px;
  padding: 1.5rem 1.2rem;
  border-radius: 14px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.muscle-layer h4 { font-size: 0.9rem; font-weight: 700; margin-bottom: 0.5rem; }
.muscle-layer p { font-size: 0.8rem; line-height: 1.6; }
.layer-deep { background: #B87333; color: #fff; }
.layer-deep h4 { color: #fff; }
.layer-mid { background: #d4a574; color: #fff; }
.layer-mid h4 { color: #fff; }
.layer-outer { background: #e8e0d0; color: #333; }
.layer-outer h4 { color: #222; }

/* ---- FAQ Section ---- */
.faq-section { margin: 2.5rem 0; }
.faq-item {
  border: 1px solid #eee;
  border-radius: 10px;
  margin-bottom: 1rem;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}
.faq-q {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 1.1rem 1.4rem;
  background: #fafafa;
  cursor: pointer;
}
.faq-q .q-mark {
  font-family: "Montserrat", sans-serif;
  font-weight: 800;
  color: #B87333;
  font-size: 1.15rem;
  flex-shrink: 0;
}
.faq-q p { font-size: 0.9rem; font-weight: 600; color: #222; margin: 0; }
.faq-a {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 1.1rem 1.4rem;
  background: #fff;
}
.faq-a .a-mark {
  font-family: "Montserrat", sans-serif;
  font-weight: 800;
  color: #a09880;
  font-size: 1.15rem;
  flex-shrink: 0;
}
.faq-a p { font-size: 0.85rem; color: #555; margin: 0; line-height: 1.8; }

/* ---- Related Articles ---- */
.related { max-width: 780px; margin: 0 auto; padding: 0 2rem; }
.related h2 { font-size: 1rem; font-weight: 700; color: #222; margin-bottom: 1rem; padding-bottom: 0.5rem; border-bottom: 2px solid #B87333; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.related-card { display: block; background: #fafafa; border-radius: 8px; padding: 1.2rem; transition: background 0.2s, transform 0.2s; text-decoration: none; border: 1px solid #eee; }
.related-card:hover { background: #faf8f5; transform: translateY(-2px); text-decoration: none; }
.related-card .r-tag { font-size: 0.65rem; color: #B87333; font-weight: 600; letter-spacing: 0.05em; }
.related-card h3 { font-size: 0.82rem; font-weight: 600; color: #222; margin-top: 0.3rem; line-height: 1.5; }

/* ---- CTA ---- */
.article-cta { text-align: center; background: #fafafa; padding: 2.5rem 2rem; margin-top: 3rem; border-radius: 12px; }
.article-cta h3 { font-size: 1.1rem; margin-bottom: 0.8rem; color: #222; }
.article-cta p { font-size: 0.88rem; color: #666; margin-bottom: 1.2rem; }
.article-cta .btn { display: inline-block; padding: 0.8rem 2rem; background: #B87333; color: #fff; border-radius: 8px; font-weight: 700; font-size: 0.9rem; text-decoration: none; transition: background 0.3s; }
.article-cta .btn:hover { background: #A86528; text-decoration: none; }

/* ---- Back Link ---- */
.back-link { text-align: center; margin-top: 2rem; }
.back-link a { font-size: 0.85rem; color: #888; text-decoration: none; }
.back-link a:hover { color: #B87333; }

/* ---- Footer ---- */
.footer { background: #222; color: #999; padding: 2rem; text-align: center; margin-top: 4rem; }
.footer p { font-size: 0.75rem; }

/* ==============================================
   Responsive
   ============================================== */
@media (max-width: 768px) {
  .header-nav { display: none; }
  .article-header h1 { font-size: 1.15rem; }
  .article-body { padding: 2rem 1.25rem; }
  .article-body h2 { font-size: 1.05rem; }
  .toc, .related, .breadcrumb { padding-left: 1.25rem; padding-right: 1.25rem; }

  /* Diagram */
  .diagram { padding: 1.8rem 1.2rem; }

  /* Flow */
  .flow { flex-direction: column; }
  .flow-arrow { transform: rotate(90deg); }

  /* Table scroll hint */
  .table-scroll-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    position: relative;
  }
  .table-scroll-wrapper::after {
    content: "\2190 \30B9\30AF\30ED\30FC\30EB\3067\304D\307E\3059 \2192";
    display: block;
    text-align: center;
    font-size: 0.72rem;
    color: #aaa;
    padding: 0.4rem 0;
  }

  /* Tables without scroll wrapper */
  .compare-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Related & Muscle */
  .related-grid { grid-template-columns: 1fr; }
  .muscle-layers { flex-direction: column; }
}
