/*
Theme Name: KOMATCH
Theme URI: https://komatch.nogusho.website
Description: 非住宅・業務用建設マッチングプラットフォーム KOMATCH のカスタムテーマ
Version: 1.0
Author: syotaro
*/

:root {
  --navy: #1a2744;
  --navy-light: #243258;
  --orange: #f97316;
  --orange-dark: #ea6c0a;
  --gray-bg: #f5f6f8;
  --gray-border: #e2e5ec;
  --text: #1a1a2e;
  --muted: #6b7280;
  --white: #ffffff;
  --radius: 8px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', sans-serif; color: var(--text); background: var(--white); }

/* ── HEADER ── */
header {
  background: var(--navy);
  padding: 0 40px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky; top: 0; z-index: 100;
  transition: transform 0.3s ease;
}
header.header-hidden {
  transform: translateY(-100%);
}
.logo { font-size: 22px; font-weight: 800; color: var(--white); letter-spacing: 0.05em; text-decoration: none; }
.logo span { color: var(--orange); }
nav { display: flex; align-items: center; gap: 28px; }
nav a { color: rgba(255,255,255,0.8); text-decoration: none; font-size: 14px; transition: color 0.2s; }
nav a:hover { color: var(--white); }
.btn-register {
  background: var(--orange); color: var(--white) !important;
  padding: 8px 20px; border-radius: var(--radius);
  font-weight: 700; font-size: 14px !important;
}

/* ── NOTICE ── */
.notice {
  background: #fffbeb; border-bottom: 1px solid #fde68a;
  padding: 10px 40px; display: flex; align-items: center;
  gap: 10px; font-size: 13px; color: #92400e;
}

/* ── HERO ── */
.hero {
  background: linear-gradient(135deg, #1a2744 0%, #1e3a5f 100%);
  padding: 52px 40px 48px;
  text-align: center;
}
.hero-tag {
  display: inline-block;
  background: rgba(249,115,22,0.2); color: var(--orange);
  border: 1px solid rgba(249,115,22,0.4);
  padding: 4px 16px; border-radius: 20px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.08em; margin-bottom: 16px;
}
.hero h1 { color: var(--white); font-size: 34px; font-weight: 900; line-height: 1.4; margin-bottom: 14px; }
.hero h1 em { color: var(--orange); font-style: normal; }
.hero p { color: rgba(255,255,255,0.7); font-size: 15px; margin-bottom: 28px; }

/* ── 検索バー ── */
.search-bar {
  max-width: 720px; margin: 0 auto;
  background: var(--white); border-radius: 12px;
  padding: 6px 6px 6px 16px;
  display: flex; align-items: center; gap: 8px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
}
.search-bar select {
  border: none; background: var(--gray-bg); border-radius: 6px;
  padding: 10px 12px; font-size: 14px; color: var(--text);
  cursor: pointer; outline: none;
}
.search-bar input {
  flex: 1; border: none; outline: none; font-size: 15px;
  color: var(--text); padding: 8px 4px;
}
.search-bar input::placeholder { color: var(--muted); }
.search-btn {
  background: var(--orange); color: var(--white);
  border: none; border-radius: 8px;
  padding: 12px 24px; font-size: 15px; font-weight: 700;
  cursor: pointer; white-space: nowrap;
}
.search-tags { display: flex; gap: 8px; justify-content: center; margin-top: 14px; flex-wrap: wrap; }
.search-tag {
  background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.75);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 4px 12px; border-radius: 20px; font-size: 12px;
  cursor: pointer; transition: background 0.2s;
}
.search-tag:hover { background: rgba(255,255,255,0.2); }

/* ── SECTION COMMON ── */
section { padding: 64px 40px; }
.section-label {
  text-align: center; font-size: 12px; font-weight: 700;
  letter-spacing: 0.15em; color: var(--orange); text-transform: uppercase; margin-bottom: 8px;
}
.section-title { text-align: center; font-size: 26px; font-weight: 900; margin-bottom: 6px; color: var(--navy); }
.section-sub { text-align: center; font-size: 14px; color: var(--muted); margin-bottom: 40px; }

/* ── CONTRACTOR GRID ── */
.contractor-section { background: var(--gray-bg); }
.filter-bar {
  display: flex; gap: 10px; justify-content: center;
  flex-wrap: wrap; margin-bottom: 36px;
}
.filter-btn {
  padding: 8px 18px; border-radius: 24px;
  border: 1.5px solid var(--gray-border);
  background: var(--white); font-size: 13px; font-weight: 600;
  color: var(--muted); cursor: pointer; transition: all 0.2s;
}
.filter-btn:hover, .filter-btn.active {
  background: var(--navy); color: var(--white); border-color: var(--navy);
}
.contractor-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1000px; margin: 0 auto 32px;
}
.contractor-card {
  background: var(--white); border: 1px solid var(--gray-border);
  border-radius: var(--radius); overflow: hidden;
  transition: box-shadow 0.2s, transform 0.1s;
  cursor: pointer; text-decoration: none; color: inherit; display: block;
}
.contractor-card:hover { box-shadow: 0 8px 28px rgba(26,39,68,0.12); transform: translateY(-2px); }
.card-head {
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  padding: 24px 20px 20px;
  display: flex; align-items: flex-start; gap: 14px;
}
.company-logo {
  width: 52px; height: 52px; border-radius: 8px;
  background: rgba(255,255,255,0.15);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.company-info { flex: 1; }
.company-name { color: var(--white); font-size: 15px; font-weight: 800; margin-bottom: 4px; }
.company-location { color: rgba(255,255,255,0.6); font-size: 12px; }
.verified-badge {
  background: rgba(249,115,22,0.3); color: var(--orange);
  border: 1px solid rgba(249,115,22,0.5);
  padding: 2px 8px; border-radius: 10px; font-size: 10px; font-weight: 700;
  margin-top: 4px; display: inline-block;
}
.card-body { padding: 16px 20px; }
.specialty-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.spec-tag {
  background: rgba(249,115,22,0.08); color: var(--orange);
  border: 1px solid rgba(249,115,22,0.2);
  padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 600;
}
.card-desc { font-size: 13px; color: var(--muted); line-height: 1.7; margin-bottom: 14px; }
.card-stats { display: flex; gap: 16px; }
.card-stat { text-align: center; }
.card-stat-num { font-size: 16px; font-weight: 900; color: var(--navy); }
.card-stat-label { font-size: 10px; color: var(--muted); }
.card-foot {
  padding: 12px 20px; border-top: 1px solid var(--gray-border);
  display: flex; align-items: center; justify-content: space-between;
}
.area-label { font-size: 12px; color: var(--muted); }
.contact-btn {
  background: var(--orange); color: var(--white);
  border: none; border-radius: 6px;
  padding: 7px 16px; font-size: 12px; font-weight: 700;
  cursor: pointer; transition: background 0.2s;
}
.contact-btn:hover { background: var(--orange-dark); }
.view-more { text-align: center; }
.btn-outline {
  display: inline-block; padding: 12px 32px;
  border: 2px solid var(--navy); border-radius: var(--radius);
  font-size: 15px; font-weight: 700; color: var(--navy);
  text-decoration: none; transition: background 0.2s, color 0.2s;
}
.btn-outline:hover { background: var(--navy); color: var(--white); }

/* ── 案件投稿セクション ── */
.post-section {
  background: linear-gradient(135deg, #1a2744, #1e3a5f);
  text-align: center;
}
.post-section .section-label { color: rgba(249,115,22,0.9); }
.post-section .section-title { color: var(--white); }
.post-section .section-sub { color: rgba(255,255,255,0.6); margin-bottom: 32px; }
.post-flow {
  display: flex; align-items: center; justify-content: center;
  gap: 0; max-width: 800px; margin: 0 auto 36px; flex-wrap: wrap;
}
.post-step {
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius); padding: 20px 24px; text-align: center;
  width: 200px;
}
.post-step-num {
  width: 36px; height: 36px; background: var(--orange); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 900; color: var(--white); margin: 0 auto 10px;
}
.post-step-title { font-size: 14px; font-weight: 700; color: var(--white); margin-bottom: 6px; }
.post-step-desc { font-size: 12px; color: rgba(255,255,255,0.55); line-height: 1.6; }
.post-arrow { color: rgba(255,255,255,0.25); font-size: 24px; padding: 0 8px; }
.cta-primary {
  display: inline-block;
  background: var(--orange); color: var(--white);
  padding: 16px 40px; border-radius: var(--radius);
  font-size: 17px; font-weight: 800; text-decoration: none;
  box-shadow: 0 4px 20px rgba(249,115,22,0.4);
  transition: background 0.2s, transform 0.1s;
}
.cta-primary:hover { background: var(--orange-dark); transform: translateY(-1px); }
.cta-note { color: rgba(255,255,255,0.45); font-size: 12px; margin-top: 10px; }

/* ── 新着案件 ── */
.projects-section { background: var(--gray-bg); }
.project-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 16px; max-width: 1000px; margin: 0 auto 32px;
}
.project-card {
  background: var(--white); border: 1px solid var(--gray-border);
  border-radius: var(--radius); overflow: hidden;
  transition: box-shadow 0.2s, transform 0.1s;
  text-decoration: none; color: inherit; display: block;
}
.project-card:hover { box-shadow: 0 6px 24px rgba(26,39,68,0.1); transform: translateY(-2px); }
.project-card-head {
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--gray-bg);
  display: flex; justify-content: space-between; align-items: flex-start; gap: 8px;
}
.project-fac-tag {
  font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 12px;
  background: rgba(249,115,22,0.1); color: var(--orange);
  border: 1px solid rgba(249,115,22,0.2); white-space: nowrap;
}
.project-date { font-size: 11px; color: var(--muted); white-space: nowrap; }
.project-card-body { padding: 14px 18px 16px; }
.project-title { font-size: 14px; font-weight: 800; color: var(--navy); margin-bottom: 10px; line-height: 1.5; }
.project-meta { display: flex; flex-direction: column; gap: 5px; }
.project-meta-row { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.project-card-foot {
  padding: 12px 18px; border-top: 1px solid var(--gray-bg);
  display: flex; align-items: center; justify-content: space-between;
}
.project-budget { font-size: 14px; font-weight: 800; color: var(--navy); }
.project-budget span { font-size: 11px; font-weight: 400; color: var(--muted); }
.project-lock {
  font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 12px;
  background: var(--gray-bg); color: var(--muted);
  border: 1px solid var(--gray-border);
}
.project-open {
  font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 12px;
  background: #dcfce7; color: #166534;
}

/* ── FOOTER ── */
footer { background: #111827; padding: 40px; color: rgba(255,255,255,0.5); font-size: 13px; }
.footer-inner { max-width: 980px; margin: 0 auto; display: flex; justify-content: space-between; gap: 40px; align-items: flex-start; }
.footer-logo { font-size: 20px; font-weight: 900; color: var(--white); margin-bottom: 8px; }
.footer-logo span { color: var(--orange); }
.footer-desc { font-size: 12px; line-height: 1.8; max-width: 260px; }
.footer-links { display: flex; gap: 48px; }
.footer-col h4 { color: rgba(255,255,255,0.8); font-size: 13px; font-weight: 700; margin-bottom: 12px; }
.footer-col a { display: block; color: rgba(255,255,255,0.45); font-size: 12px; text-decoration: none; margin-bottom: 8px; transition: color 0.2s; }
.footer-col a:hover { color: rgba(255,255,255,0.8); }
.footer-bottom {
  max-width: 980px; margin: 24px auto 0; padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 11px; color: rgba(255,255,255,0.3); text-align: center;
}

/* ── HAMBURGER ── */
.hamburger {
  display: none;
  flex-direction: column; justify-content: center; gap: 5px;
  width: 36px; height: 36px; cursor: pointer;
  background: none; border: none; padding: 4px;
}
.hamburger span {
  display: block; width: 24px; height: 2px;
  background: var(--white); border-radius: 2px;
  transition: all 0.25s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  display: none;
  position: fixed; top: 64px; left: 0; right: 0; bottom: 0;
  background: var(--navy); z-index: 99;
  flex-direction: column; padding: 24px 20px; gap: 4px;
  overflow-y: auto;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  color: rgba(255,255,255,0.85); text-decoration: none;
  font-size: 16px; font-weight: 600; padding: 14px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  transition: color 0.2s;
}
.mobile-nav a:hover { color: var(--white); }
.mobile-nav .btn-register-mob {
  margin-top: 16px;
  background: var(--orange); color: var(--white) !important;
  text-align: center; border-radius: var(--radius);
  font-weight: 700; border-bottom: none;
}

/* ── LEGAL / CONTACT PAGES ── */
.legal-wrap {
  max-width: 800px;
  margin: 0 auto;
  padding: 60px 40px 80px;
}
.legal-wrap h1 {
  font-size: 26px;
  font-weight: 900;
  color: var(--navy);
  margin-bottom: 6px;
}
.legal-date {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 40px;
  display: block;
}
.legal-wrap h2 {
  font-size: 15px;
  font-weight: 800;
  color: var(--navy);
  margin: 36px 0 10px;
  padding-left: 12px;
  border-left: 3px solid var(--orange);
}
.legal-wrap p {
  font-size: 14px;
  line-height: 1.9;
  color: #374151;
  margin-bottom: 12px;
}
.legal-wrap ul {
  padding-left: 20px;
  margin: 6px 0 12px;
}
.legal-wrap li {
  font-size: 14px;
  line-height: 1.9;
  color: #374151;
}
.contact-wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 60px 40px 80px;
}
.contact-wrap h1 {
  font-size: 26px;
  font-weight: 900;
  color: var(--navy);
  margin-bottom: 8px;
}
.contact-wrap .contact-sub {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 40px;
  line-height: 1.7;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  header { padding: 0 16px; }
  nav { display: none; }
  .hamburger { display: flex; }

  .notice { padding: 10px 16px; font-size: 12px; }

  .hero { padding: 36px 16px 28px; }
  .hero h1 { font-size: 22px; }
  .hero p { font-size: 14px; }

  .search-bar {
    flex-direction: column; align-items: stretch;
    padding: 12px; gap: 10px;
  }
  .search-bar select { width: 100%; }
  .search-bar input { padding: 10px 4px; }
  .search-btn { width: 100%; padding: 13px; }

  section { padding: 48px 16px; }
  .section-sub { text-wrap: balance; }

  .contractor-grid { grid-template-columns: 1fr; }
  .contractor-grid .contractor-card:nth-child(n+4) { display: none; }

  .post-flow { flex-direction: column; align-items: center; gap: 0; }
  .post-step { width: 100%; max-width: 340px; }
  .post-arrow { transform: rotate(90deg); padding: 4px 0; }
  .cta-primary { width: 100%; max-width: 340px; text-align: center; box-sizing: border-box; }

  .project-grid { grid-template-columns: 1fr; }

  footer { padding: 32px 20px; }
  .footer-inner { flex-direction: column; gap: 28px; }
  .footer-desc { max-width: 100%; }
  .footer-links { flex-wrap: wrap; gap: 28px; }
  .footer-col { min-width: 120px; }
}
