/*
Theme Name:  TechTech
Theme URI:   https://tech-tech.nddhq.co.jp/
Description: 株式会社エヌデーデー TechTechブログ用カスタムテーマ。採用訴求型テックメディア。
Author:      株式会社エヌデーデー
Version:     1.0.0
License:     All Rights Reserved
Text Domain: techtech
*/

/* ===================================================
   Base / Typography
=================================================== */

html, body {
  overflow-x: hidden;
  max-width: 100%;
}

body {
  font-family: 'Noto Sans JP', 'Inter', sans-serif;
  background-color: #f9fafb;
  color: #111827;
}

/* ===================================================
   Article Body (the_content() 出力に適用)
   Gutenberg ブロックのスタイル上書き
=================================================== */

.article-body {
  font-size: 1rem;
  line-height: 1.9;
  color: #374151;
}

.article-body h2 {
  font-size: 1.25rem;
  font-weight: 900;
  color: #111827;
  padding-left: 1rem;
  border-left: 4px solid #06b6d4;
  margin-top: 3rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.article-body h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: #111827;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid #e5e7eb;
}

.article-body h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #374151;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.article-body p {
  margin-bottom: 1.5rem;
  line-height: 1.95;
}

.article-body a {
  color: #0891b2;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-body a:hover {
  color: #06b6d4;
}

.article-body strong {
  font-weight: 800;
  color: #111827;
}

.article-body ul,
.article-body ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.article-body ul {
  list-style-type: disc;
}

.article-body ol {
  list-style-type: decimal;
}

.article-body li {
  margin-bottom: 0.4rem;
  line-height: 1.8;
}

/* Gutenberg Image block */
.article-body figure {
  margin: 2rem 0;
}

.article-body figure img {
  border-radius: 0.75rem;
  width: 100%;
  height: auto;
}

.article-body figcaption {
  text-align: center;
  font-size: 0.8rem;
  color: #9ca3af;
  margin-top: 0.5rem;
}

/* Blockquote */
.article-body blockquote,
.article-body .wp-block-quote {
  border-left: 4px solid #06b6d4;
  background-color: #ecfeff;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  border-radius: 0 0.5rem 0.5rem 0;
  color: #0e7490;
}

.article-body blockquote p,
.article-body .wp-block-quote p {
  margin-bottom: 0;
  font-style: normal;
}

/* Inline code */
.article-body code,
.article-body :not(pre) > code {
  background-color: #f1f5f9;
  color: #be185d;
  font-family: 'Fira Code', 'Courier New', monospace;
  font-size: 0.875em;
  padding: 0.15em 0.4em;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
}

/* Code blocks */
.article-body pre,
.article-body .wp-block-code {
  background-color: #0f172a;
  border-radius: 0.75rem;
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin: 1.75rem 0;
  border: 1px solid #1e293b;
}

.article-body pre code {
  background: none;
  color: #e2e8f0;
  font-size: 0.875rem;
  padding: 0;
  border: none;
  border-radius: 0;
  line-height: 1.7;
}

/* Tables */
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

.article-body th {
  background-color: #f0f9ff;
  color: #0e7490;
  font-weight: 700;
  padding: 0.6rem 1rem;
  border: 1px solid #e0f2fe;
  text-align: left;
}

.article-body td {
  padding: 0.6rem 1rem;
  border: 1px solid #e5e7eb;
  color: #374151;
}

.article-body tr:nth-child(even) td {
  background-color: #f9fafb;
}

/* Horizontal rule */
.article-body hr {
  border: none;
  border-top: 2px dashed #e5e7eb;
  margin: 2.5rem 0;
}

/* ===================================================
   Utility
=================================================== */

.line-clamp-1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.card-hover {
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.13);
}

/* ===================================================
   TOC (Table of Contents) — single.php
=================================================== */

.toc-link {
  display: block;
  padding: 0.3rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.8rem;
  color: #6b7280;
  line-height: 1.5;
  transition: background-color 0.15s, color 0.15s;
  text-decoration: none;
}
.toc-link:hover { background-color: #f0f9ff; color: #0891b2; }
.toc-link.active { background-color: #ecfeff; color: #0891b2; font-weight: 700; }
.toc-link.toc-h3 { padding-left: 1.25rem; font-size: 0.75rem; }

/* ===================================================
   Prism.js overrides
=================================================== */

pre[class*="language-"] {
  background: #0f172a !important;
  border-radius: 0.75rem !important;
  margin: 1.75rem 0 !important;
}

.token.comment { color: #64748b; }
.token.keyword { color: #a78bfa; }
.token.string  { color: #34d399; }
.token.function { color: #60a5fa; }
.token.number  { color: #fb923c; }

/* Code block language label */
.code-block-wrapper {
  position: relative;
}

.code-lang-label {
  position: absolute;
  top: 0.6rem;
  right: 0.75rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #475569;
  font-family: 'Fira Code', monospace;
}

/* ===================================================
   WPForms Lite — Tailwind リセット対策
   Tailwind のベーススタイルでフォーム要素が崩れる場合の補正
=================================================== */

.wpforms-container input[type="text"],
.wpforms-container input[type="email"],
.wpforms-container input[type="tel"],
.wpforms-container input[type="url"],
.wpforms-container input[type="number"],
.wpforms-container textarea,
.wpforms-container select {
  display: block;
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  background-color: #ffffff;
  font-size: 0.9rem;
  color: #111827;
  line-height: 1.5;
  transition: border-color 0.15s;
}

.wpforms-container input:focus,
.wpforms-container textarea:focus,
.wpforms-container select:focus {
  outline: none;
  border-color: #06b6d4;
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
}

.wpforms-container .wpforms-submit {
  display: inline-flex;
  align-items: center;
  background-color: #06b6d4;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.65rem 1.75rem;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  transition: background-color 0.15s;
}

.wpforms-container .wpforms-submit:hover {
  background-color: #0891b2;
}

.wpforms-container .wpforms-field-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: #374151;
  margin-bottom: 0.35rem;
}

.wpforms-container .wpforms-error {
  color: #dc2626;
  font-size: 0.8rem;
  margin-top: 0.3rem;
}

/* ===================================================
   Pagination — paginate_links() 出力スタイル
   Tailwind preflight で ul がリセットされるため明示指定
=================================================== */

ul.page-numbers {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

ul.page-numbers li {
  display: flex;
}

ul.page-numbers li a.page-numbers,
ul.page-numbers li span.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.625rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #4b5563;
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  text-decoration: none;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

ul.page-numbers li a.page-numbers:hover {
  background-color: #ecfeff;
  border-color: #06b6d4;
  color: #0891b2;
}

ul.page-numbers li span.current {
  background-color: #06b6d4;
  border-color: #06b6d4;
  color: #ffffff;
  font-weight: 700;
}

ul.page-numbers li span.dots {
  border-color: transparent;
  background: transparent;
  color: #9ca3af;
}

ul.page-numbers li a.prev,
ul.page-numbers li a.next {
  padding: 0 0.85rem;
  gap: 0.25rem;
}
