/* タクミ総建 - 静的サイト用 基本スタイル */
:root {
  --accent: #07913a;        /* メインカラー（緑） */
  --accent-dark: #006f29;   /* 濃い緑（hover, h1 の文字色など） */
  --cta: #ff8a00;           /* CTA/ボタン色（オレンジ） */
  --cta-dark: #e07700;
  --text: #333;
  --muted: #666;
  --border: #dcdcdc;
  --bg: #fff;
  --bg-soft: #f4f2ea;       /* 背景グラデーションのクリーム色 */
  --max-width: 1100px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Hiragino Kaku Gothic ProN", "ヒラギノ角ゴ ProN W3", Meiryo, "メイリオ", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: linear-gradient(var(--bg-soft), #fff 40%);
  background-attachment: fixed;
  line-height: 1.75;
  font-size: 16px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }

/* ---- ヘッダー ---- */
.site-header {
  border-top: 4px solid var(--accent);
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
  gap: 20px;
  flex-wrap: wrap;
}
.logo a { display: inline-block; }
.logo img { height: 56px; width: auto; }
.header-contact {
  font-size: 14px;
  color: var(--muted);
  text-align: right;
}
.header-contact .tel {
  display: block;
  font-size: 22px;
  font-weight: bold;
  color: var(--accent-dark);
}

/* ---- ナビゲーション ---- */
.main-nav {
  background: var(--accent);
}
.main-nav ul {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
}
.main-nav a {
  display: block;
  padding: 14px 24px;
  color: #fff;
  font-weight: bold;
  font-size: 15px;
  border-left: 1px solid rgba(255,255,255,.25);
}
.main-nav li:last-child a { border-right: 1px solid rgba(255,255,255,.25); }
.main-nav a:hover { background: var(--accent-dark); text-decoration: none; }

.nav-toggle {
  display: none;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 12px 20px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  width: 100%;
}

@media (max-width: 800px) {
  .nav-toggle { display: block; }
  .main-nav ul { display: none; flex-direction: column; }
  .main-nav.open ul { display: flex; }
  .main-nav a { border-left: none; border-top: 1px solid rgba(255,255,255,.25); }
  .header-contact { display: none; }
  .logo img { height: 40px; }
}

/* ---- メインビジュアル ---- */
.hero {
  position: relative;
  overflow: hidden;
  background: #000;
  max-height: 480px;
}
.hero-slider {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.hero-slider img {
  flex: 0 0 100%;
  scroll-snap-align: start;
  object-fit: cover;
  max-height: 480px;
}

/* ---- レイアウト ---- */
.page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 40px;
  padding: 40px 0 60px;
}
.content { min-width: 0; }
.sidebar {
  font-size: 14px;
}

@media (max-width: 800px) {
  .page { grid-template-columns: 1fr; gap: 30px; padding: 24px 0 40px; }
}

/* ---- 本文要素 ---- */
.content h1, .content h2 {
  color: var(--accent-dark);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 8px;
  margin: 32px 0 18px;
  font-size: 1.6em;
}
.content h3 {
  color: var(--accent-dark);
  border-left: 5px solid var(--accent);
  padding-left: 12px;
  margin: 28px 0 14px;
  font-size: 1.25em;
}
.content h4 {
  margin: 24px 0 10px;
  font-size: 1.1em;
  color: var(--text);
}
.content p { margin: 0 0 16px; }
.content ul, .content ol { padding-left: 1.5em; margin: 0 0 16px; }
.content li { margin-bottom: 4px; }
.content img { margin: 16px auto; border-radius: 4px; }
.content table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}
.content th, .content td {
  padding: 10px 14px;
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
.content th {
  background: var(--bg-soft);
  width: 30%;
}
.content blockquote {
  margin: 16px 0;
  padding: 12px 20px;
  background: var(--bg-soft);
  border-left: 4px solid var(--accent);
}

/* ---- サイドバー ---- */
.sidebar h2 {
  font-size: 1.05em;
  background: var(--accent);
  color: #fff;
  margin: 0 0 12px;
  padding: 10px 14px;
  border: none;
}
.sidebar nav ul { list-style: none; padding: 0; margin: 0 0 24px; }
.sidebar nav li { border-bottom: 1px dashed var(--border); }
.sidebar nav a {
  display: block;
  padding: 10px 6px 10px 18px;
  color: var(--text);
  position: relative;
}
.sidebar nav a::before {
  content: "▶";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 10px;
  top: 50%;
  transform: translateY(-50%);
}
.sidebar .contact-card {
  background: var(--bg-soft);
  padding: 16px;
  margin-bottom: 20px;
  border-radius: 4px;
  font-size: 13px;
}
.sidebar .contact-card h2 {
  display: inline-block;
  margin-bottom: 10px;
  padding: 6px 12px;
  font-size: 14px;
}
.sidebar .contact-card .tel {
  font-size: 22px;
  font-weight: bold;
  color: var(--accent-dark);
  display: block;
}

/* ---- 事業内容・施工実績のグリッド ---- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  margin: 20px 0;
}
.card-grid article {
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
}
.card-grid img { margin: 0; width: 100%; height: 180px; object-fit: cover; }
.card-grid h3 {
  font-size: 1em;
  margin: 12px;
  padding: 0;
  border: none;
}

/* ---- フォーム ---- */
form.contact-form {
  max-width: 100%;
}
form.contact-form label {
  display: block;
  font-weight: bold;
  margin: 20px 0 6px;
}
form.contact-form .required { color: #d63017; font-size: 0.85em; margin-left: 4px; }
form.contact-form input[type=text],
form.contact-form input[type=email],
form.contact-form input[type=tel],
form.contact-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font: inherit;
}
form.contact-form textarea { min-height: 180px; resize: vertical; }
form.contact-form .checkboxes label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 8px 16px 0 0;
  font-weight: normal;
}
form.contact-form button {
  margin-top: 24px;
  background: linear-gradient(var(--cta), var(--cta-dark));
  color: #fff;
  border: 1px solid var(--cta-dark);
  padding: 14px 36px;
  font-size: 16px;
  font-weight: bold;
  border-radius: 4px;
  cursor: pointer;
}
form.contact-form button:hover { background: var(--cta-dark); }
form.contact-form .hp { position: absolute; left: -9999px; }
.field-error { color: #d63017; font-size: 0.9em; margin-top: 4px; }

.notice {
  padding: 14px 18px;
  margin: 16px 0;
  border-radius: 4px;
  border-left: 4px solid;
}
.notice.error { background: #fdecec; border-color: #d63017; color: #a01919; }
.notice.success { background: #ecf7ed; border-color: #2a913a; color: #1e6b2a; }

/* ---- フッター ---- */
.site-footer {
  background: #2a2a2a;
  color: #ccc;
  padding: 40px 0 20px;
  margin-top: 40px;
  font-size: 14px;
}
.site-footer .wrap { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; }
.site-footer h2 {
  color: var(--accent);
  font-size: 1em;
  margin: 0 0 10px;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer a { color: #ccc; }
.site-footer .copyright {
  text-align: center;
  border-top: 1px solid #444;
  margin-top: 30px;
  padding-top: 16px;
  font-size: 12px;
}
@media (max-width: 800px) {
  .site-footer .wrap { grid-template-columns: 1fr; gap: 20px; }
}

.pagetop {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background: var(--accent);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  opacity: 0.85;
}
.pagetop:hover { text-decoration: none; opacity: 1; }
