/* =========================================================
   CONTACT Section (FINAL / Replace all)
   - #contact only
   - Heading: BUSINESS style (center + yellow line)
   - Form: clean rows (Access-like)
   - Submit: compact + brand blue + center (guaranteed)
========================================================= */

:root{
  --brand-blue: #1e4cff;
  --brand-navy: #00467F;
  --accent-yellow: #ffe600;
}

/* =========================
   Layout
========================= */
#contact{
  position: relative;
  padding: 110px 0;
}

#contact .container{
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

/* =========================
   Heading (BUSINESS寄せ)
========================= */
#contact .sec-head{
  margin: 0 auto 60px;
  text-align: center;
  /* width: min(980px, 92vw); */
}

/* 旧after線は殺す */
#contact .sec-head::after{
  content: none !important;
}

#contact .sec-head-en{
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .22em;
  color: var(--brand-navy);
}

#contact .sec-head-ja{
  margin: 10px 0 0;
  font-size: 32px;
  font-weight: 900;
  letter-spacing: .04em;
  line-height: 1.2;
  color: #111;
}

/* 黄色ライン */
#contact .section-accent{
  display: block;
  height: 4px;
  width: clamp(220px, 56vw, 760px);
  margin: 14px auto 0;
  border-radius: 999px;
  background: var(--accent-yellow);
}

/* =========================
   Panel
========================= */
#contact .contact-panel{
  background: #fff;
  border-radius: 12px;
  padding: 28px;
  box-shadow: 0 10px 30px rgba(0,0,0,.05);
  border: 1px solid rgba(0,0,0,.08);
}

/* =========================
   CF7 base reset
========================= */
#contact .wpcf7,
#contact .wpcf7 form{
  margin-top: 30px;
  max-width: 100%;
  font-weight: 700;
  line-height: 1.6;
}

/* CF7のp余白を殺す（崩れの主因） */
#contact .wpcf7 p{
  margin: 0 !important;
  padding: 0 !important;
}

/* brでズレるのを抑える（必要なら） */
#contact .wpcf7 br{
  display: none;
}

/* =========================
   Rows (1項目=1行)
   ※フォーム側は各項目を <div> で囲む想定
========================= */
#contact .wpcf7 form > div{
  padding: 26px 0 5px;
}

#contact .wpcf7 form > div:first-child{
  padding-top: 0;
}

#contact .wpcf7 form > div:last-child{
  padding-bottom: 0;
}

/* =========================
   Labels / Required badge
========================= */
#contact .wpcf7 label{
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .02em;
  color: #111;
}

/* 必須バッジ */
#contact .wpcf7 .req{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  padding: 0 10px;
  border-radius: 6px;
  background: #ff6a4a;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

/* =========================
   Inputs (100%固定)
========================= */
#contact .wpcf7 input[type="text"],
#contact .wpcf7 input[type="email"],
#contact .wpcf7 input[type="tel"],
#contact .wpcf7 input[type="url"],
#contact .wpcf7 input[type="number"],
#contact .wpcf7 select,
#contact .wpcf7 textarea{
  width: 100% !important; /* ← ここが重要（勝つ） */
  border: 1px solid rgba(0,0,0,.16);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 16px;
  background: #fff;
  outline: none;
  box-sizing: border-box;
  transition: box-shadow .2s ease, border-color .2s ease;
}

#contact .wpcf7 textarea{
  min-height: 220px;
  resize: vertical;
}

/* focus：ブランド青 */
#contact .wpcf7 input:focus,
#contact .wpcf7 select:focus,
#contact .wpcf7 textarea:focus{
  border-color: rgba(30,76,255,.65);
  box-shadow: 0 0 0 4px rgba(30,76,255,.12);
}

/* =========================
   Submit area (guaranteed center + compact)
   ※フォーム側で送信行に class="cf7-actions" を付ける
========================= */

/* 送信行：中央寄せ＆幅指定を完全無効化 */
#contact .wpcf7 .cf7-actions{
  width: auto !important;          /* テーマ側 width:50% を殺す */
  max-width: none !important;
  display: flex !important;        /* blockを殺す */
  justify-content: center !important;
  align-items: center !important;
  margin: 18px auto 0 !important;
  padding-top: 18px !important;
  border-top: 1px solid rgba(0,0,0,.10) !important;
  text-align: center !important;
}

/* CF7ラッパーが幅を持つケースを無効化 */
#contact .wpcf7 .cf7-actions .wpcf7-form-control-wrap{
  width: auto !important;
  display: inline-block !important;
}

/* ボタン本体：コンパクト固定（submitだけ） */
#contact .wpcf7 input[type="submit"]{
  appearance: none;
  border: 0;
  background: var(--brand-blue);
  color: #fff;

  /* width: auto !important;          100% 指定を殺す */
  max-width: none !important;

  min-width: 180px;                /* お好みで 160-220 */
  padding: 12px 28px;
  border-radius: 999px;

  font-size: 14px;
  font-weight: 900;
  letter-spacing: .16em;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, opacity .2s ease;
}

#contact .wpcf7 input[type="submit"]:hover{
  background: #1743d6;
  box-shadow: 0 10px 22px rgba(30,76,255,.22);
  transform: translateY(-1px);
}

#contact .wpcf7 input[type="submit"]:active{
  transform: translateY(0);
  opacity: .95;
}

#contact .wpcf7 input[type="submit"]:focus-visible{
  outline: 3px solid rgba(30,76,255,.35);
  outline-offset: 3px;
}

/* スピナー位置 */
#contact .wpcf7 .wpcf7-spinner{
  display: inline-block;
  margin-left: 10px;
  vertical-align: middle;
}

/* =========================
   Messages
========================= */
#contact .wpcf7 .wpcf7-response-output{
  margin: 18px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  font-weight: 700;
  border: 1px solid rgba(0,0,0,.12);
}

/* =========================
   Responsive
========================= */
@media (max-width: 900px){
  #contact{ padding: 90px 0; text-align: left;}
  #contact .contact-panel{ padding: 10px; }
  #contact .sec-head-ja{ font-size: 28px; }
}

@media (max-width: 640px){
  #contact .sec-head-ja{ font-size: 18px; }
  #contact .wpcf7 input[type="submit"]{
    min-width: 170px;
    padding: 11px 26px;
    letter-spacing: .1em;
  }

  #contact .wpcf7, #contact .wpcf7 form {
    line-height: 1.5;
    font-size: 14px;
}
#access .access-list {
    padding-left: 0;
    line-height: 1.5;
    font-size: 14px;
}
#access .access-subhead {
    font-size: 16px;
}
#contact .container {
    padding: 0 10px;
}
}
