/*
Theme Name: アップワーク.com ガイド
Theme URI: https://xn--cck0a9c0duf6c.com/
Author: アップワーク.com
Description: 日本人向けUpwork受注ガイドのための専用テーマ。案件情報を管理画面から更新できます。
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: upwork-guide
*/

/* =========================================================
   アップワーク.com — 日本語Upworkガイド
   デザイン基調: Upwork風（グリーン / 白 / 余白広め）
   ※ 非公式サイト。ロゴ・商標は使用しない方針。
   ========================================================= */

:root {
  --green:        #14a800;
  --green-dark:   #108a00;
  --green-deep:   #001e00;
  --green-tint:   #f2f7f2;
  --green-line:   #d5e0d5;
  --ink:          #001e00;
  --ink-muted:    #5e6d55;
  --white:        #ffffff;
  --accent:       #f6a200;

  --radius:       12px;
  --radius-pill:  999px;
  --wrap:         1180px;
  --gap:          clamp(1rem, 3vw, 2rem);

  --font-jp: "Hiragino Kaku Gothic ProN", "ヒラギノ角ゴ ProN W3",
             "Noto Sans JP", "Yu Gothic Medium", "游ゴシック Medium",
             Meiryo, sans-serif;
  --shadow-sm: 0 1px 2px rgba(0, 30, 0, .06), 0 2px 8px rgba(0, 30, 0, .04);
  --shadow-md: 0 4px 12px rgba(0, 30, 0, .08), 0 12px 32px rgba(0, 30, 0, .06);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-jp);
  font-size: 16px;
  line-height: 1.85;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  line-height: 1.4;
  letter-spacing: .01em;
  margin: 0 0 .6em;
  font-weight: 700;
}
h1 { font-size: clamp(1.9rem, 4.4vw, 3.1rem); line-height: 1.28; letter-spacing: -.01em; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.2rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.35rem); }
p  { margin: 0 0 1.2em; }

.wrap {
  width: min(100% - 2.5rem, var(--wrap));
  margin-inline: auto;
}

.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section--tint { background: var(--green-tint); }
.section--deep { background: var(--green-deep); color: #e8f0e6; }
.section--deep h2 { color: var(--white); }

.section__head { max-width: 46rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section__lead { color: var(--ink-muted); font-size: 1.05rem; margin: 0; }
.section--deep .section__lead { color: #b6c7b2; }

.eyebrow {
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--green-dark);
  margin-bottom: .8rem;
}
.section--deep .eyebrow { color: #7ed957; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  padding: .85em 1.9em;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.btn:hover { text-decoration: none; }
.btn--primary { background: var(--green); color: var(--white); }
.btn--primary:hover { background: var(--green-dark); color: var(--white); }
.btn--ghost { border-color: var(--green); color: var(--green-dark); background: transparent; }
.btn--ghost:hover { background: rgba(20, 168, 0, .08); }
.btn--onDeep { background: var(--white); color: var(--green-deep); }
.btn--onDeep:hover { background: #e8f0e6; }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--green-line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 68px;
}
.logo {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--ink);
  letter-spacing: -.01em;
  white-space: nowrap;
}
.logo:hover { text-decoration: none; }
.logo b { color: var(--green); }

.nav { margin-left: auto; }
.nav ul {
  display: flex;
  align-items: center;
  gap: clamp(.8rem, 2vw, 1.7rem);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav a {
  color: var(--ink);
  font-size: .94rem;
  font-weight: 500;
  padding: .3em 0;
}
.nav a:hover { color: var(--green-dark); text-decoration: none; }

.nav-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: 0;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
  padding: .2em .4em;
}

/* ---------- hero ---------- */
.hero {
  background: linear-gradient(180deg, var(--green-tint) 0%, var(--white) 100%);
  padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(3rem, 7vw, 5rem);
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.hero__title { margin-bottom: .5em; }
.hero__title .hl {
  color: var(--green);
  background: linear-gradient(transparent 62%, rgba(20, 168, 0, .16) 62%);
}
.hero__lead {
  font-size: clamp(1rem, 1.6vw, 1.13rem);
  color: var(--ink-muted);
  max-width: 34rem;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }
.hero__note { font-size: .85rem; color: var(--ink-muted); margin: 1.1rem 0 0; }

.hero__card {
  background: var(--white);
  border: 1px solid var(--green-line);
  border-radius: 20px;
  padding: clamp(1.4rem, 3vw, 2rem);
  box-shadow: var(--shadow-md);
}
.hero__card h3 { font-size: 1.05rem; margin-bottom: 1.1rem; }

.stat-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.stat-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .9rem;
  align-items: baseline;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--green-line);
}
.stat-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.stat-list .num {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--green);
  line-height: 1.2;
  white-space: nowrap;
}
.stat-list .lbl { font-size: .9rem; color: var(--ink-muted); line-height: 1.6; }

/* ---------- steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: var(--gap);
  counter-reset: step;
}
.step {
  background: var(--white);
  border: 1px solid var(--green-line);
  border-radius: var(--radius);
  padding: 1.7rem 1.5rem;
  position: relative;
}
.step::before {
  counter-increment: step;
  content: "STEP " counter(step);
  display: block;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--green);
  margin-bottom: .7rem;
}
.step h3 { font-size: 1.08rem; margin-bottom: .5rem; }
.step p { font-size: .93rem; color: var(--ink-muted); margin: 0 0 .9rem; }
.step a { font-size: .9rem; font-weight: 700; }

/* ---------- cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--gap);
}
.card {
  background: var(--white);
  border: 1px solid var(--green-line);
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card h3 { font-size: 1.05rem; margin-bottom: .6rem; }
.card p { font-size: .93rem; color: var(--ink-muted); margin: 0 0 1rem; }
.card__tag {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  padding: .28em .8em;
  border-radius: var(--radius-pill);
  background: var(--green-tint);
  color: var(--green-dark);
  margin-bottom: .8rem;
}
.card__more { font-size: .9rem; font-weight: 700; }

/* ---------- job table (毎月更新セクション) ---------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.job-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  font-size: .94rem;
}
.job-table th, .job-table td {
  padding: .95em 1.1em;
  text-align: left;
  border-bottom: 1px solid var(--green-line);
  vertical-align: top;
}
.job-table thead th {
  background: var(--green-deep);
  color: var(--white);
  font-size: .85rem;
  letter-spacing: .04em;
  white-space: nowrap;
}
.job-table tbody tr:last-child td { border-bottom: 0; }
.job-table tbody tr:nth-child(even) { background: #fafcfa; }
.job-table .job-name { font-weight: 700; }
.job-table .rate { color: var(--green-dark); font-weight: 700; white-space: nowrap; }

.level { font-size: .8rem; font-weight: 700; padding: .25em .7em; border-radius: var(--radius-pill); white-space: nowrap; }
.level--easy { background: #e6f5e2; color: #2b7a1a; }
.level--mid  { background: #fff2d9; color: #9a6800; }
.level--hard { background: #fde8e6; color: #b0342a; }

.updated-note { font-size: .85rem; color: var(--ink-muted); margin-top: 1rem; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: .8rem; max-width: 52rem; }
.faq details {
  background: var(--white);
  border: 1px solid var(--green-line);
  border-radius: var(--radius);
  padding: 0 1.3rem;
}
.faq summary {
  cursor: pointer;
  font-weight: 700;
  padding: 1.1rem 2rem 1.1rem 0;
  list-style: none;
  position: relative;
  font-size: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--green);
  line-height: 1;
}
.faq details[open] summary::after { content: "−"; }
.faq details > p {
  margin: 0 0 1.2rem;
  color: var(--ink-muted);
  font-size: .95rem;
  border-top: 1px solid var(--green-line);
  padding-top: 1.1rem;
}

/* ---------- CTA band ---------- */
.cta-band { text-align: center; }
.cta-band h2 { max-width: 34rem; margin-inline: auto; }
.cta-band p { max-width: 40rem; margin-inline: auto; color: #b6c7b2; }
.cta-band .btn { margin-top: 1.4rem; }

/* ---------- footer ---------- */
.site-footer {
  background: var(--green-deep);
  color: #a9bda5;
  padding: clamp(2.5rem, 5vw, 4rem) 0 2rem;
  font-size: .9rem;
}
.site-footer a { color: #d8e6d4; }
.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(auto-fit, minmax(150px, 1fr));
  gap: 2rem;
  padding-bottom: 2.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.site-footer h4 { color: var(--white); font-size: .95rem; margin: 0 0 .9rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.site-footer__brand .logo { color: var(--white); display: inline-block; margin-bottom: .7rem; }
.site-footer__brand p { font-size: .86rem; line-height: 1.8; margin: 0; }

.disclaimer {
  margin-top: 1.8rem;
  font-size: .8rem;
  line-height: 1.85;
  color: #8fa58b;
}
.copyright { margin: 1.2rem 0 0; font-size: .8rem; color: #8fa58b; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__card { order: 2; }
}

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .nav {
    display: none;
    position: absolute;
    inset: 68px 0 auto;
    background: var(--white);
    border-bottom: 1px solid var(--green-line);
    box-shadow: var(--shadow-md);
    padding: .6rem 1.25rem 1.2rem;
  }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .nav li { border-bottom: 1px solid var(--green-line); }
  .nav li:last-child { border-bottom: 0; }
  .nav a { display: block; padding: .95em 0; }
  .site-header__inner { position: relative; }
  .site-footer__grid { grid-template-columns: 1fr; }
}

/* =========================================================
   WordPress 用の追加スタイル
   ========================================================= */

/* ---------- 記事・固定ページ本文 ---------- */
.entry__head { max-width: 46rem; margin-bottom: clamp(1.6rem, 3vw, 2.4rem); }
.entry__head h1 { margin-bottom: 0; }

.entry {
  max-width: 46rem;
  font-size: 1.02rem;
}
.entry > * + * { margin-top: 1.4em; }
.entry h2 {
  margin-top: 2.4em;
  padding-bottom: .4em;
  border-bottom: 2px solid var(--green-line);
}
.entry h3 { margin-top: 2em; }
.entry ul, .entry ol { padding-left: 1.4em; }
.entry li + li { margin-top: .5em; }
.entry a { text-decoration: underline; }

.entry blockquote {
  margin-inline: 0;
  padding: 1.1rem 1.4rem;
  background: var(--green-tint);
  border-left: 4px solid var(--green);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--ink-muted);
}
.entry blockquote > :last-child { margin-bottom: 0; }

.entry code {
  background: var(--green-tint);
  padding: .15em .45em;
  border-radius: 4px;
  font-size: .92em;
}
.entry pre {
  background: var(--green-deep);
  color: #e8f0e6;
  padding: 1.1rem 1.3rem;
  border-radius: var(--radius);
  overflow-x: auto;
}
.entry pre code { background: none; padding: 0; color: inherit; }

.entry table {
  width: 100%;
  border-collapse: collapse;
  font-size: .95rem;
  display: block;
  overflow-x: auto;
}
.entry th, .entry td {
  padding: .8em 1em;
  border: 1px solid var(--green-line);
  text-align: left;
  vertical-align: top;
}
.entry thead th { background: var(--green-tint); white-space: nowrap; }

.entry img { border-radius: var(--radius); }
.entry hr { border: 0; border-top: 1px solid var(--green-line); margin: 2.4em 0; }

/* WordPress コアのクラス */
.alignleft  { float: left;  margin: .4em 1.4em 1em 0; }
.alignright { float: right; margin: .4em 0 1em 1.4em; }
.aligncenter { display: block; margin-inline: auto; }
.alignwide, .alignfull { max-width: none; }
.wp-caption { max-width: 100%; }
.wp-caption-text, .wp-element-caption {
  font-size: .85rem;
  color: var(--ink-muted);
  margin-top: .5em;
}
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

/* カード内リンク */
.card h3 a { color: inherit; }
.card h3 a:hover { color: var(--green-dark); text-decoration: none; }

/* ---------- ページネーション ---------- */
.pagination { margin-top: clamp(2rem, 4vw, 3rem); }
.pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: center;
  align-items: center;
}
.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.6em;
  height: 2.6em;
  padding: 0 .8em;
  border: 1px solid var(--green-line);
  border-radius: var(--radius-pill);
  background: var(--white);
  color: var(--ink);
  font-size: .95rem;
  font-weight: 600;
}
.pagination .page-numbers:hover { border-color: var(--green); color: var(--green-dark); text-decoration: none; }
.pagination .page-numbers.current { background: var(--green); border-color: var(--green); color: var(--white); }
.pagination .page-numbers.dots { border: 0; background: none; }

.page-links { margin-top: 2rem; font-weight: 600; }
.page-links a { padding: 0 .4em; }

/* ---------- 管理バー表示時のヘッダー位置 ---------- */
.admin-bar .site-header { top: 32px; }
@media screen and (max-width: 782px) {
  .admin-bar .site-header { top: 46px; }
}
@media (max-width: 720px) {
  .admin-bar .nav { top: 114px; }
}

/* =========================================================
   図解（SVG）
   ========================================================= */
.ug-fig {
  margin: 2em 0;
  padding: 0;
}
.ug-fig svg {
  display: block;
  width: 100%;
  height: auto;
  background: var(--white);
  border: 1px solid var(--green-line);
  border-radius: var(--radius);
}
.ug-fig figcaption {
  font-size: .86rem;
  color: var(--ink-muted);
  margin-top: .7em;
  line-height: 1.7;
}

/* 図解内の共通テキストスタイル */
.ug-fig .t     { font-family: var(--font-jp); fill: var(--ink); }
.ug-fig .t-sm  { font-size: 13px; }
.ug-fig .t-xs  { font-size: 11px; }
.ug-fig .t-lg  { font-size: 17px; font-weight: 700; }
.ug-fig .t-num { font-size: 22px; font-weight: 700; fill: var(--green); }
.ug-fig .t-mut { fill: var(--ink-muted); }
.ug-fig .t-wht { fill: #ffffff; }
.ug-fig .box       { fill: #ffffff; stroke: var(--green-line); }
.ug-fig .box-tint  { fill: var(--green-tint); stroke: var(--green-line); }
.ug-fig .box-green { fill: var(--green); stroke: var(--green); }
.ug-fig .box-deep  { fill: var(--green-deep); stroke: var(--green-deep); }
.ug-fig .box-warn  { fill: #fff2d9; stroke: #f6a200; }
.ug-fig .arrow     { stroke: var(--green); stroke-width: 2; fill: none; }
.ug-fig .line-dash { stroke: var(--green-line); stroke-width: 1.5; stroke-dasharray: 4 4; fill: none; }

/* 注意ボックス */
.ug-note {
  margin: 2em 0;
  padding: 1.2rem 1.4rem;
  border: 2px solid var(--green-line);
  border-radius: var(--radius);
  background: var(--white);
}
.ug-note > :first-child { margin-top: 0; }
.ug-note > :last-child { margin-bottom: 0; }
.ug-note__label {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .06em;
  padding: .25em .8em;
  border-radius: var(--radius-pill);
  background: var(--green-tint);
  color: var(--green-dark);
  margin-bottom: .8rem;
}
.ug-note--warn { border-color: #f6a200; background: #fffdf7; }
.ug-note--warn .ug-note__label { background: #fff2d9; color: #9a6800; }
.ug-note--danger { border-color: #e0574a; background: #fffaf9; }
.ug-note--danger .ug-note__label { background: #fde8e6; color: #b0342a; }

/* 出典表記 */
.ug-source {
  font-size: .82rem;
  color: var(--ink-muted);
  line-height: 1.75;
  padding-top: 1.2rem;
  margin-top: 2.5rem;
  border-top: 1px solid var(--green-line);
}
.ug-source strong { color: var(--ink); }

/* 目次 */
.ug-toc {
  background: var(--green-tint);
  border-radius: var(--radius);
  padding: 1.3rem 1.5rem;
  margin: 2em 0;
}
.ug-toc h2 {
  font-size: 1rem !important;
  margin: 0 0 .8rem !important;
  padding: 0 !important;
  border: 0 !important;
}
.ug-toc ol { margin: 0; padding-left: 1.3em; }
.ug-toc li + li { margin-top: .4em; }
.ug-toc a { text-decoration: none; }
.ug-toc a:hover { text-decoration: underline; }
