/* =========================================================
   有限会社渡電気商会 ベース版スタイル
   色・余白は :root の変数で一元管理
   ========================================================= */

:root {
  --color-navy: #1d3557;
  --color-navy-dark: #142640;
  --color-blue: #2a6fb5;
  --color-blue-light: #e8f1fa;
  --color-text: #2b2f36;
  --color-text-sub: #5b6470;
  --color-border: #dde3ea;
  --color-bg: #ffffff;
  --color-bg-alt: #f5f8fb;
  --color-placeholder: #e3e8ee;
  --color-placeholder-text: #7a8592;
  --color-tbd: #fff5c2;

  --font-base: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  --header-height: 64px;
  --radius: 8px;
  --container: 1120px;
}

/* ---------- リセット・基本 ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  margin: 0;
  font-family: var(--font-base);
  font-size: 16px;
  line-height: 1.8;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-text-size-adjust: 100%;
  /* スマホ下部の固定電話ボタン分の余白 */
  padding-bottom: 56px;
}

h1, h2, h3, p, ul, ol, figure {
  margin: 0;
}

ul, ol {
  padding: 0;
  list-style: none;
}

a {
  color: var(--color-blue);
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 16px;
}

.pc-only {
  display: none;
}

/* ---------- 仮置き表示（本公開時に .tbd の背景を消すだけでOK） ---------- */
.tbd {
  background-color: var(--color-tbd);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* 暗い背景上では塗りつぶしの代わりに点線枠で示す */
.hero .tbd,
.site-footer .tbd {
  background-color: transparent;
  outline: 1px dashed rgba(255, 230, 120, 0.8);
  outline-offset: 3px;
}

.draft-banner {
  background: #333;
  color: #fff;
  font-size: 13px;
  text-align: center;
  padding: 6px 16px;
}

.draft-banner .tbd {
  color: #333;
  background: var(--color-tbd);
  padding: 0 4px;
}

/* ---------- 写真プレースホルダー ---------- */
/* 写真が用意できたら、div を <img src="images/xxx.jpg" alt="..."> に置き換える */
.photo-placeholder {
  position: relative;
  background-color: var(--color-placeholder);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237a8592' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z'/%3E%3Ccircle cx='12' cy='13' r='4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center calc(50% - 14px);
  background-size: 40px 40px;
}

.photo-placeholder::after {
  content: attr(data-label);
  position: absolute;
  left: 50%;
  top: calc(50% + 24px);
  transform: translateX(-50%);
  width: 90%;
  text-align: center;
  font-size: 13px;
  line-height: 1.5;
  color: var(--color-placeholder-text);
}

/* ---------- ボタン ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.btn-primary {
  background: var(--color-blue);
  color: #fff;
  border: 2px solid var(--color-blue);
}

.btn-primary:hover {
  background: var(--color-navy);
  border-color: var(--color-navy);
}

.btn-outline-light {
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.8);
}

.btn-outline-light:hover {
  background: #fff;
  color: var(--color-navy);
}

/* ---------- ヘッダー ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  height: var(--header-height);
  gap: 24px;
}

.logo {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  color: var(--color-navy);
  margin-right: auto;
}

.logo-sub {
  font-size: 11px;
  color: var(--color-text-sub);
}

.logo-main {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.header-tel {
  display: none;
}

/* ハンバーガーボタン */
.menu-toggle {
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.menu-toggle span {
  display: block;
  height: 2px;
  background: var(--color-navy);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(11px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-11px) rotate(-45deg);
}

/* スマホ時のナビ（ドロワー） */
.global-nav {
  position: absolute;
  top: var(--header-height);
  left: 0;
  right: 0;
  background: #fff;
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.06);
  display: none;
}

.global-nav.is-open {
  display: block;
}

.global-nav a {
  display: block;
  padding: 14px 16px;
  color: var(--color-text);
  font-weight: 500;
  border-top: 1px solid var(--color-border);
}

/* ---------- ヒーロー ---------- */
.hero {
  position: relative;
  min-height: 460px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-photo {
  position: absolute;
  inset: 0;
  background-color: #8796a8;
}

.hero-overlay {
  position: relative;
  width: 100%;
  padding: 64px 0 80px;
  background: linear-gradient(90deg, rgba(20, 38, 64, 0.88) 0%, rgba(20, 38, 64, 0.6) 60%, rgba(20, 38, 64, 0.2) 100%);
  color: #fff;
  min-height: 460px;
  display: flex;
  align-items: center;
}

.hero-lead {
  font-size: 14px;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
  opacity: 0.9;
}

.hero-title {
  font-size: 32px;
  line-height: 1.45;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 20px;
}

.hero-text {
  font-size: 15px;
  margin-bottom: 32px;
  opacity: 0.95;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- セクション共通 ---------- */
.section {
  padding: 64px 0;
}

.section-alt {
  background: var(--color-bg-alt);
}

.section-en {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--color-blue);
  margin-bottom: 4px;
}

.section-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--color-navy);
  letter-spacing: 0.05em;
  margin-bottom: 16px;
  position: relative;
  padding-bottom: 14px;
}

.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 40px;
  height: 3px;
  background: var(--color-blue);
}

.section-desc {
  color: var(--color-text-sub);
  margin-bottom: 36px;
}

/* ---------- ごあいさつ ---------- */
.about-inner {
  display: grid;
  gap: 32px;
}

.about-photo {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
}

img.about-photo {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.about-body p + p {
  margin-top: 1em;
}

.about-body .section-title {
  margin-bottom: 24px;
}

.about-sign {
  text-align: right;
  font-weight: 500;
  margin-top: 1.5em !important;
}

/* ---------- 事業内容 ---------- */
.service-grid {
  display: grid;
  gap: 24px;
}

.service-card {
  position: relative;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(29, 53, 87, 0.08);
  display: flex;
  flex-direction: column;
}

.service-photo {
  aspect-ratio: 16 / 10;
}

img.service-photo {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.service-body {
  padding: 20px 20px 24px;
}

.service-body h3 {
  font-size: 18px;
  color: var(--color-navy);
  margin-bottom: 8px;
  line-height: 1.5;
}

.service-body p {
  font-size: 14px;
  color: var(--color-text-sub);
}

/* ---------- ご依頼の流れ ---------- */
.flow-list {
  display: grid;
  gap: 16px;
  counter-reset: none;
}

.flow-step {
  background: #fff;
  border-radius: var(--radius);
  padding: 24px 20px;
  border-top: 4px solid var(--color-blue);
  box-shadow: 0 2px 10px rgba(29, 53, 87, 0.06);
}

.flow-num {
  display: block;
  font-size: 28px;
  font-weight: 700;
  color: var(--color-blue);
  line-height: 1;
  margin-bottom: 8px;
}

.flow-step h3 {
  font-size: 17px;
  color: var(--color-navy);
  margin-bottom: 8px;
}

.flow-step p {
  font-size: 14px;
  color: var(--color-text-sub);
}

/* ---------- 会社概要 ---------- */
.company-inner {
  display: grid;
  gap: 32px;
  margin-top: 36px;
}

.company-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.company-table th,
.company-table td {
  display: block;
  text-align: left;
  padding: 12px 4px;
}

.company-table th {
  font-weight: 700;
  color: var(--color-navy);
  padding-bottom: 0;
  font-size: 13px;
}

.company-table td {
  border-bottom: 1px solid var(--color-border);
}

.company-map {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-placeholder);
}

.company-map iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* スマホでは地図を画面の横幅いっぱいに表示（.container の左右余白 16px を打ち消す） */
@media (max-width: 639px) {
  .company-map {
    margin: 0 -16px;
    border-radius: 0;
  }
}

/* ---------- お問い合わせ ---------- */
.contact {
  background: var(--color-navy);
  color: #fff;
}

.contact .section-en {
  color: #9cc3ea;
}

.contact .section-title {
  color: #fff;
}

.contact .section-title::after {
  background: #9cc3ea;
}

.contact .section-desc {
  color: rgba(255, 255, 255, 0.8);
}

.contact-grid {
  display: grid;
  gap: 16px;
}

.contact-box {
  background: #fff;
  color: var(--color-text);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
}

.contact-box h3 {
  font-size: 16px;
  color: var(--color-navy);
  margin-bottom: 12px;
}

.contact-tel {
  display: inline-block;
  font-size: 32px;
  font-weight: 700;
  color: var(--color-navy);
  letter-spacing: 0.04em;
  line-height: 1.4;
}

.contact-mail {
  display: inline-block;
  font-size: 20px;
  font-weight: 700;
  word-break: break-all;
  line-height: 1.6;
}

.contact-note {
  font-size: 13px;
  color: var(--color-text-sub);
  margin-top: 8px;
}

.contact-form-btn {
  margin: 4px 0 2px;
}

/* =========================================================
   お問い合わせフォーム（contact.html / thanks.html）
   ========================================================= */
.container-narrow {
  max-width: 800px;
}

.global-nav a[aria-current="page"] {
  color: var(--color-blue);
}

/* ページ見出し */
.page-header {
  background: var(--color-navy);
  color: #fff;
  padding: 40px 0;
}

.page-header .section-en {
  color: #9cc3ea;
}

.page-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin: 0;
}

/* 入力 → 確認 → 完了 の手順表示 */
.form-steps {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 40px;
}

.form-step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-placeholder-text);
}

.form-step + .form-step::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--color-border);
  margin-right: 4px;
}

.form-step span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-placeholder);
  color: var(--color-placeholder-text);
  font-size: 13px;
}

.form-step.is-current {
  color: var(--color-navy);
}

.form-step.is-current span {
  background: var(--color-blue);
  color: #fff;
}

.form-lead {
  margin-bottom: 32px;
}

/* 入力欄 */
.form-field {
  margin: 0 0 24px;
  padding: 0;
  border: 0;
  min-width: 0;
}

.form-field > label,
.form-field > legend {
  display: block;
  padding: 0;
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: 8px;
}

.req,
.opt {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 4px;
  margin-left: 8px;
  vertical-align: 2px;
}

.req {
  background: #c0392b;
  color: #fff;
}

.opt {
  background: var(--color-placeholder);
  color: var(--color-text-sub);
}

.contact-form input[type="text"],
.contact-form input[type="tel"],
.contact-form input[type="email"],
.contact-form textarea {
  width: 100%;
  font: inherit;
  font-size: 16px; /* iOS で入力時に拡大されないよう 16px 以上 */
  color: var(--color-text);
  background: #fff;
  border: 1px solid #c4ccd6;
  border-radius: 6px;
  padding: 12px 14px;
}

.contact-form textarea {
  resize: vertical;
  line-height: 1.7;
}

.contact-form ::placeholder {
  color: #a3acb7;
}

.contact-form input:focus-visible,
.contact-form textarea:focus-visible {
  outline: none;
  border-color: var(--color-blue);
  box-shadow: 0 0 0 3px rgba(42, 111, 181, 0.2);
}

.contact-form [aria-invalid="true"] {
  border-color: #c0392b;
  background-color: #fdf3f2;
}

.field-error {
  color: #c0392b;
  font-size: 13px;
  font-weight: 500;
  margin-top: 6px;
}

.field-error:empty {
  display: none;
}

.send-error {
  text-align: center;
  margin-top: 16px;
}

/* ラジオボタン・チェックボックス */
.radio-grid {
  display: grid;
  gap: 8px;
}

.radio,
.checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.radio {
  border: 1px solid #c4ccd6;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 15px;
  line-height: 1.5;
  background: #fff;
}

.radio:has(input:checked) {
  border-color: var(--color-blue);
  background: var(--color-blue-light);
}

.radio input,
.checkbox input {
  width: 18px;
  height: 18px;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--color-blue);
}

.checkbox {
  font-weight: 700;
  justify-content: center;
  margin-top: 16px;
}

.checkbox + .field-error {
  text-align: center;
}

/* いたずら送信対策の欄（画面外に隠す） */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* 個人情報の取り扱い */
.privacy {
  margin-top: 40px;
}

.privacy-title {
  font-size: 16px;
  color: var(--color-navy);
  margin-bottom: 8px;
}

.privacy-body {
  font-size: 13px;
  color: var(--color-text-sub);
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 16px;
}

.privacy-body.tbd {
  background-color: var(--color-tbd);
}

.privacy-body p + p {
  margin-top: 0.5em;
}

/* ボタン */
button.btn {
  font-family: inherit;
  cursor: pointer;
}

.btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.btn-outline {
  background: #fff;
  color: var(--color-navy);
  border: 2px solid var(--color-navy);
}

.btn-outline:hover {
  background: var(--color-bg-alt);
}

.btn-wide {
  width: 100%;
  max-width: 320px;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 40px;
}

/* 確認画面 */
.confirm-list {
  margin: 0;
  border-top: 1px solid var(--color-border);
}

.confirm-list > div {
  padding: 14px 4px;
  border-bottom: 1px solid var(--color-border);
}

.confirm-list dt {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-navy);
}

.confirm-list dd {
  margin: 4px 0 0;
  word-break: break-word;
}

.confirm-list dd.is-empty {
  color: var(--color-placeholder-text);
}

.confirm-message {
  white-space: pre-wrap;
}

/* 完了・エラー画面 */
.thanks {
  text-align: center;
}

.thanks-title {
  font-size: 22px;
  color: var(--color-navy);
  margin-bottom: 20px;
}

.thanks-note {
  font-size: 14px;
  color: var(--color-text-sub);
  margin-top: 16px;
}

/* =========================================================
   プライバシーポリシー（privacy.html）
   ========================================================= */
.policy h2 {
  font-size: 18px;
  color: var(--color-navy);
  margin: 40px 0 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--color-border);
}

.policy p + p {
  margin-top: 0.75em;
}

.policy ul {
  list-style: disc;
  padding-left: 1.5em;
}

.policy li + li {
  margin-top: 0.25em;
}

.policy a {
  color: var(--color-blue);
  text-decoration: underline;
}

.policy .policy-date {
  margin-top: 48px;
  text-align: right;
  font-size: 14px;
  color: var(--color-text-sub);
}

.error-list {
  display: inline-block;
  text-align: left;
  color: #c0392b;
  list-style: disc;
  padding-left: 1.5em;
}

/* ---------- フッター ---------- */
.site-footer {
  background: var(--color-navy-dark);
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  padding: 40px 0 16px;
}

.footer-inner {
  display: grid;
  gap: 24px;
}

.footer-name {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.footer-nav a {
  color: rgba(255, 255, 255, 0.8);
}

.footer-nav a:hover {
  color: #fff;
}

.copyright {
  text-align: center;
  margin-top: 32px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

/* ---------- スマホ用固定電話ボタン ---------- */
.fixed-tel {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--color-blue);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.12);
}

.fixed-tel::before {
  content: "";
  width: 20px;
  height: 20px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.13.96.36 1.9.7 2.81a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.91.34 1.85.57 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* =========================================================
   タブレット以上
   ========================================================= */
@media (min-width: 640px) {
  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .flow-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .contact-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .company-table th,
  .company-table td {
    display: table-cell;
    padding: 16px 12px;
    border-bottom: 1px solid var(--color-border);
    vertical-align: top;
  }

  .company-table th {
    width: 30%;
    font-size: 15px;
    background: var(--color-bg-alt);
  }

  .radio-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .confirm-list > div {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 16px;
    padding: 16px 12px;
  }

  .confirm-list dt {
    font-size: 15px;
  }

  .confirm-list dd {
    margin: 0;
  }
}

/* =========================================================
   PC
   ========================================================= */
@media (min-width: 960px) {
  :root {
    --header-height: 80px;
  }

  body {
    padding-bottom: 0;
  }

  .pc-only {
    display: inline;
  }

  .container {
    padding: 0 24px;
  }

  .fixed-tel,
  .menu-toggle {
    display: none;
  }

  .logo-main {
    font-size: 26px;
  }

  .global-nav {
    position: static;
    display: block;
    background: none;
    border: none;
    box-shadow: none;
  }

  .global-nav ul {
    display: flex;
    gap: 4px;
  }

  .global-nav a {
    border: none;
    padding: 8px 12px;
    font-size: 15px;
  }

  .global-nav a:hover {
    color: var(--color-blue);
  }

  .header-tel {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.3;
    color: var(--color-navy);
  }

  .header-tel-label {
    font-size: 11px;
    color: var(--color-text-sub);
  }

  .header-tel-number {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.04em;
  }

  .hero,
  .hero-overlay {
    min-height: 560px;
  }

  .hero-title {
    font-size: 46px;
  }

  .hero-text {
    font-size: 17px;
  }

  .section {
    padding: 96px 0;
  }

  .section-title {
    font-size: 32px;
  }

  .page-header {
    padding: 56px 0;
  }

  .page-title {
    font-size: 32px;
  }

  .about-inner {
    grid-template-columns: 5fr 7fr;
    gap: 56px;
    align-items: center;
  }

  .service-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
  }

  .flow-list {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
  }

  .company-inner {
    grid-template-columns: 3fr 2fr;
    gap: 40px;
    align-items: start;
  }

  .company-map {
    aspect-ratio: auto;
    height: 100%;
    min-height: 360px;
  }

  .contact-tel {
    font-size: 40px;
  }

  .footer-inner {
    grid-template-columns: 1fr auto;
    align-items: end;
  }
}
