/*
 Theme Name:   GP Asahikawa - Ninbai
 Theme URI:    https://asahikawa.shirokuma2103.com
 Description:  旭川任意売却専用 — GeneratePress 子テーマ
 Author:       しろくま建物管理
 Author URI:   https://shirokuma2103.com
 Template:     generatepress
 Version:      1.0.0
 Text Domain:  gp-asahikawa
*/

/* =============================================================
   旭川任意売却サイト CSS
   メインサイト GP 子テーマから物件/検索関連を削除した軽量版。
   ============================================================= */

/* ===== カスタムプロパティ ===== */
:root {
  --primary-900: #0c3547;
  --primary-700: #155a75;
  --primary-500: #1e7ea1;
  --primary-300: #5bb5d5;
  --primary-100: #d4eef7;
  --primary-50:  #eef7fb;

  --neutral-900: #1a1a2e;
  --neutral-700: #3d3d56;
  --neutral-500: #6b6b80;
  --neutral-300: #c4c4d4;
  --neutral-100: #f0f0f5;
  --neutral-50:  #fafafe;

  --accent-warm: #e8a44a;
  --accent-warm-hover: #d4923a;

  --white: #ffffff;
  --shadow-color: rgba(12, 53, 71, 0.08);

  --radius: 12px;
  --transition: 0.2s ease;
}

/* ===== GP 親テーマオーバーライド ===== */
.separate-containers .site-main {
  margin: 0;
}

.widget-area .widget {
  padding: 20px;
}

/* ===== ベース ===== */
body {
  background-color: var(--primary-50);
  color: var(--neutral-900);
  font-size: 16px;
  line-height: 1.8;
}

/* ===== レイアウト ===== */
.site-main {
  flex: 1;
  min-width: 0;
  background-color: transparent;
}

.inside-article {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 24px 64px;
}

.site {
  min-height: 100vh;
}

.site-content {
  display: flex;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 24px;
  gap: 30px;
}

/* ===== ヘッダー ===== */
.site-header {
  background: var(--white);
  box-shadow: 0 1px 3px var(--shadow-color);
}

.site-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
  display: flex;
  align-items: center;
}

.site-title {
  margin: 0;
  padding: 8px 16px;
  flex: 0 0 auto;
  max-width: 50%;
}

/* ===== サイトロゴ ===== */
.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.site-logo__icon {
  width: 60px;
  height: 60px;
  object-fit: contain;
  flex-shrink: 0;
}

.site-logo__text {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
  white-space: nowrap;
}

.site-logo__name {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary-900);
  letter-spacing: 0.04em;
}

.site-logo__tagline {
  font-size: 13px;
  font-weight: 500;
  color: var(--neutral-500);
}

/* ===== サイドバー ===== */
.widget-area {
  flex: 0 0 300px;
  max-width: 300px;
}

/* ===== 見出し ===== */
.inside-article h1 {
  font-size: 36px;
  font-weight: 800;
  color: var(--primary-900);
  letter-spacing: 0.02em;
  line-height: 1.4;
  margin-bottom: 44px;
  padding-bottom: 16px;
  border-bottom: none;
  box-shadow: 0 2px 0 var(--primary-300);
}

.inside-article h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary-900);
  margin-bottom: 28px;
  padding: 0 0 12px;
  border-bottom: none;
  box-shadow: 0 2px 0 var(--primary-100);
  letter-spacing: 0.01em;
}

.inside-article h3 {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary-700);
  margin-bottom: 16px;
  line-height: 1.5;
}

/* ===== リンク共通 ===== */
.inside-article a {
  color: var(--primary-700);
  transition: color var(--transition);
}

.inside-article a:hover,
.inside-article a:focus-visible {
  color: var(--primary-500);
}

/* ===== ヘッダーCTA ===== */
.header-cta {
  background: var(--white);
  flex: 1;
}

.header-cta-inner {
  margin: 0 auto;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 10px 20px;
  gap: 16px;
}

.tel {
  text-align: right;
}

.tel a {
  font-size: 24px;
  padding-left: 5px;
  color: var(--neutral-900);
  text-decoration: none;
  white-space: nowrap;
}

.btn-text {
  color: var(--neutral-700);
  font-size: 14px;
}

.btn-link {
  display: inline-block;
  background: var(--primary-700);
  padding: 8px 20px;
  color: var(--white);
  font-size: 14px;
  white-space: nowrap;
  text-decoration: none;
  border: none;
  border-radius: 5px;
  box-shadow:
    0 1px 3px var(--shadow-color),
    0 3px 8px rgba(12, 53, 71, 0.05);
  transition: background-color var(--transition), color var(--transition), box-shadow var(--transition);
}

.btn-link:hover,
.btn-link:focus-visible {
  background: var(--white);
  color: var(--primary-700);
  box-shadow:
    inset 0 0 0 2px var(--primary-700),
    0 2px 8px rgba(21, 90, 117, 0.15);
  outline: none;
}

.btn-item {
  display: flex;
  gap: 20px;
}

.header-cta .site-description {
  max-width: 1100px;
  margin: 0 auto;
  padding: 8px 24px 0;
  color: var(--neutral-700);
  font-size: 14px;
  line-height: 1.6;
}

/* ===== グローバルナビ ===== */
.gnav-wrap {
  background: var(--primary-700);
}

.gnav {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

.gnav-inner {
  overflow: visible;
}

.gnav-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
}

.gnav-menu li {
  position: relative;
}

.gnav-menu li a {
  display: block;
  color: var(--white);
  text-decoration: none;
  padding: 12px 16px;
  font-size: 14px;
  transition: background-color var(--transition);
}

.gnav-menu li a:hover {
  background-color: var(--primary-500);
}

.gnav-menu .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--primary-700);
  min-width: 200px;
  z-index: 100;
  list-style: none;
  padding: 0;
  margin: 0;
  box-shadow: 0 4px 12px var(--shadow-color);
}

.gnav-menu li:hover > .sub-menu {
  display: block;
}

.gnav-menu .sub-menu li a {
  padding: 10px 16px;
  font-size: 13px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.gnav-toggle-wrap {
  display: none;
}

.gnav-toggle {
  background: none;
  border: none;
  color: var(--white);
  padding: 12px 16px;
  cursor: pointer;
}

.gnav-toggle-icon,
.gnav-toggle-icon::before,
.gnav-toggle-icon::after {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: var(--transition);
}

.gnav-toggle-icon {
  position: relative;
}

.gnav-toggle-icon::before,
.gnav-toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
}

.gnav-toggle-icon::before {
  top: -7px;
}

.gnav-toggle-icon::after {
  top: 7px;
}

/* ===== ヒーローセクション ===== */
.hero-section {
  position: relative;
}

.hero {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px;
  text-align: center;
}

.hero__lead {
  font-size: 32px;
  font-weight: 800;
  color: var(--primary-900);
  line-height: 1.4;
  margin: 0 0 8px;
}

.hero__sub {
  font-size: 16px;
  font-weight: 500;
  color: var(--neutral-700);
  margin: 0 0 24px;
}

.hero__cta {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.hero__btn {
  display: inline-block;
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  border-radius: 8px;
  transition: background-color var(--transition), transform var(--transition), box-shadow var(--transition);
  text-align: center;
}

.hero__btn--primary {
  background-color: var(--primary-700);
  color: var(--white);
  box-shadow:
    0 2px 4px rgba(21, 90, 117, 0.25),
    0 4px 12px rgba(21, 90, 117, 0.15);
}

.hero__btn--primary:hover,
.hero__btn--primary:focus-visible {
  background-color: var(--primary-500);
  color: var(--white);
  transform: translateY(-2px);
}

.hero__btn--accent {
  background-color: var(--accent-warm);
  color: var(--white);
  box-shadow:
    0 2px 4px rgba(232, 164, 74, 0.25),
    0 4px 12px rgba(232, 164, 74, 0.15);
}

.hero__btn--accent:hover,
.hero__btn--accent:focus-visible {
  background-color: var(--accent-warm-hover);
  color: var(--white);
  transform: translateY(-2px);
}

/* ===== トップページカード ===== */
.ninbai-hub-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.ninbai-hub-card {
  display: block;
  padding: 20px;
  border: 1px solid var(--neutral-300);
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.ninbai-hub-card:hover {
  border-color: var(--primary-300);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.ninbai-hub-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-700);
  margin: 0 0 8px;
}

.ninbai-hub-card p {
  font-size: 14px;
  color: var(--neutral-500);
  margin: 0;
}

/* ===== CTA セクション ===== */
.ninbai-cta {
  text-align: center;
  background: var(--primary-100);
  border-radius: var(--radius);
  padding: 40px 36px;
  margin: 40px 0;
}

.ninbai-cta h2 {
  color: var(--primary-900);
  margin-bottom: 16px;
  box-shadow: none;
}

.ninbai-cta p {
  color: var(--neutral-700);
  font-size: 16px;
  margin-bottom: 24px;
}

.ninbai-cta .tel-large {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary-700);
  text-decoration: none;
}

.ninbai-cta .tel-note {
  display: block;
  font-size: 14px;
  color: var(--neutral-500);
  margin-top: 4px;
}

/* ===== フッター ===== */
.footer-wrap {
  background: var(--neutral-100);
  margin-top: 60px;
}

.site-footer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px;
}

.footer-columns {
  display: flex;
  gap: 40px;
}

.footer-col {
  flex: 1;
  color: var(--neutral-700);
  font-size: 14px;
  line-height: 1.8;
}

.footer-col a {
  color: var(--primary-700);
  text-decoration: none;
  transition: color var(--transition);
}

.footer-col a:hover {
  color: var(--primary-500);
}

.footer-map iframe {
  width: 100%;
  height: 220px;
}

.footer-nav {
  border-top: 1px solid var(--neutral-300);
  text-align: center;
  padding: 15px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: center;
  gap: 24px;
}

.footer-nav li a {
  color: var(--neutral-700);
  text-decoration: none;
  font-size: 14px;
  transition: color var(--transition);
}

.footer-nav li a:hover {
  color: var(--primary-700);
}

.copyright-wrap {
  background: var(--primary-900);
  text-align: center;
  padding: 12px;
}

.copyright {
  color: var(--white);
  font-size: 13px;
}

/* ===== ページトップボタン ===== */
.page-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 90;
  margin: 0;
}

.page-top a {
  display: block;
  width: 50px;
  height: 50px;
  background: var(--primary-700);
  color: var(--white);
  text-align: center;
  line-height: 50px;
  border-radius: 50%;
  text-decoration: none;
  box-shadow: 0 2px 8px var(--shadow-color);
  transition: background-color var(--transition);
}

.page-top a:hover {
  background: var(--primary-500);
}

/* ===== サイドバー CTA ===== */
.side-cta {
  background: var(--primary-100);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  margin-bottom: 24px;
}

.side-cta h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary-900);
  margin: 0 0 12px;
}

.side-cta .tel-link {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary-700);
  text-decoration: none;
}

.side-cta .tel-sub {
  display: block;
  font-size: 13px;
  color: var(--neutral-500);
  margin-top: 4px;
}

/* ===== レスポンシブ — 768px 以下 ===== */
@media (max-width: 768px) {
  .site-content {
    flex-direction: column;
    padding: 15px 16px;
    gap: 20px;
  }

  .site-main,
  .site-content .content-area {
    width: 100%;
  }

  .widget-area {
    flex: 0 0 auto;
    max-width: 100%;
  }

  .gnav {
    display: flex;
    justify-content: flex-end;
    max-width: 100%;
  }

  .gnav-toggle-wrap {
    display: block;
  }

  .gnav-inner {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--primary-700);
  }

  .gnav-inner.active {
    display: block;
  }

  .gnav-menu {
    flex-direction: column;
  }

  .gnav-menu .sub-menu {
    position: static;
    box-shadow: none;
  }

  .footer-columns {
    flex-direction: column;
    gap: 30px;
  }

  .site-main .inside-article {
    padding: 28px 12px 40px;
  }

  .inside-article h1 {
    font-size: 26px;
    margin-bottom: 32px;
  }

  .inside-article h2 {
    font-size: 22px;
    margin-bottom: 20px;
  }

  .hero__lead {
    font-size: 24px;
  }

  .hero__cta {
    flex-direction: column;
    align-items: center;
  }

  .hero__btn {
    width: 100%;
    max-width: 300px;
  }

  .ninbai-hub-grid {
    grid-template-columns: 1fr;
  }

  .site-logo__icon {
    width: 48px;
    height: 48px;
  }

  .site-logo__name {
    font-size: 18px;
  }
}

/* ===== レスポンシブ — スマホ（600px以下） ===== */
@media (max-width: 600px) {
  .site-main .inside-article {
    padding: 16px 8px;
  }

  .site-content {
    padding: 10px 8px;
  }

  .header-cta .site-description {
    display: none;
  }

  p.page-top {
    bottom: 110px;
    right: 5px;
  }

  .header-cta {
    width: 100%;
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 100;
    box-shadow: 0 0 5px var(--neutral-300);
  }

  .header-cta-inner {
    flex-direction: column;
    padding: 0;
  }

  .btn-item {
    background: var(--white);
    width: 100%;
    justify-content: center;
    padding: 10px 15px;
  }

  .tel {
    width: 100%;
    background: var(--primary-700);
    text-align: center;
    color: var(--white);
    padding: 5px 0;
  }

  .tel br {
    display: none;
  }

  .tel a {
    font-size: 32px;
    padding: 0;
    color: var(--white);
    text-decoration: underline;
  }

  .btn-text {
    color: var(--white);
  }

  .site-logo__icon {
    width: 36px;
    height: 36px;
  }

  .site-logo {
    gap: 8px;
  }

  .site-logo__name {
    font-size: 14px;
  }

  .site-logo__tagline {
    font-size: 10px;
  }

  .hero__lead {
    font-size: 20px;
  }

  .hero__sub {
    font-size: 14px;
  }
}

/* =============================================================
   チャットボット — リード獲得ウィジェット
   ============================================================= */

/* トリガーボタン */
.chatbot__trigger {
  position: fixed;
  bottom: 24px;
  right: 20px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-700);
  color: var(--white);
  border: none;
  border-radius: 28px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(12, 53, 71, 0.3);
  transition: transform var(--transition), box-shadow var(--transition);
}

.chatbot__trigger:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(12, 53, 71, 0.4);
}

.chatbot__trigger--hidden {
  display: none;
}

.chatbot__trigger-icon {
  display: flex;
  align-items: center;
}

.chatbot__trigger-text {
  white-space: nowrap;
}

/* バウンスアニメーション */
@keyframes chatbot-bounce {
  0%, 100% { transform: translateY(0); }
  25% { transform: translateY(-8px); }
  50% { transform: translateY(0); }
  75% { transform: translateY(-4px); }
}

.chatbot__trigger--bounce {
  animation: chatbot-bounce 0.8s ease 2;
}

/* ウィジェット本体 */
.chatbot__widget {
  position: fixed;
  bottom: 24px;
  right: 20px;
  z-index: 9999;
  width: 340px;
  max-width: calc(100vw - 40px);
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(12, 53, 71, 0.2);
  display: none;
  overflow: hidden;
}

.chatbot__widget--open {
  display: block;
}

/* ヘッダー */
.chatbot__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--primary-700);
  color: var(--white);
  padding: 14px 16px;
}

.chatbot__header-title {
  font-size: 15px;
  font-weight: 600;
}

.chatbot__close {
  background: none;
  border: none;
  color: var(--white);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

/* 本文 */
.chatbot__body {
  padding: 16px;
}

/* 吹き出し */
.chatbot__bubble {
  background: var(--primary-50);
  border-radius: 12px 12px 12px 0;
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--neutral-900);
  margin-bottom: 14px;
}

/* 選択肢ボタン群 */
.chatbot__options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chatbot__option {
  display: block;
  width: 100%;
  padding: 12px 14px;
  background: var(--white);
  border: 1px solid var(--primary-300);
  border-radius: 8px;
  font-size: 14px;
  color: var(--neutral-900);
  cursor: pointer;
  text-align: left;
  transition: background var(--transition), border-color var(--transition);
}

.chatbot__option:hover {
  background: var(--primary-50);
  border-color: var(--primary-500);
}

/* フォーム */
.chatbot__form {
  display: flex;
  gap: 8px;
}

.chatbot__input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--neutral-300);
  border-radius: 8px;
  font-size: 15px;
  outline: none;
  transition: border-color var(--transition);
}

.chatbot__input:focus {
  border-color: var(--primary-500);
}

.chatbot__input--error {
  border-color: #e74c3c;
}

/* ボタン */
.chatbot__btn {
  background: var(--accent-warm);
  color: var(--white);
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition);
}

.chatbot__btn:hover {
  background: var(--accent-warm-hover);
}

.chatbot__btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* エラー表示 */
.chatbot__error {
  color: #e74c3c;
  font-size: 13px;
  margin-top: 10px;
  line-height: 1.5;
}

/* Step3 閉じるボタン */
.chatbot__close-final {
  width: 100%;
  margin-top: 8px;
}

/* ===== チャットボット レスポンシブ 600px ===== */
@media (max-width: 600px) {
  .chatbot__trigger {
    bottom: 170px;
    right: 12px;
    padding: 10px 16px;
    font-size: 13px;
  }

  .chatbot__widget {
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    max-width: 100%;
    border-radius: var(--radius) var(--radius) 0 0;
  }
}
