/* ==========================================================
   lh-common.css
   レキオスハウジング 共通ヘッダー／フッター／ボタン
   header-lh.php / footer-lh.php を使う全テンプレートで共有。
   front-page.php / page-free-fee.php / 将来の固定ページ等で enqueue。

   WordPress移植後は page-free-fee.css のヘッダー・フッター部分は
   このファイルに一本化し、ページ固有の pff-* CSS のみ残す。
   ========================================================== */

/* ----------------------------------------------------------
   1. CSS変数（サイト全体で共通 — front-page.php と完全一致）
   ---------------------------------------------------------- */
:root {
  --ocean:      #0077b6;
  --sky:        #00b4d8;
  --light-blue: #90e0ef;
  --pale:       #e0f4fd;
  --sand:       #f5f0e8;
  --white:      #ffffff;
  --text:       #1a3a4c;
  --gray:       #5a7a8a;
  --green:      #52b788;
  --radius:     12px;
  --line-green: #06c755;
  --line-dark:  #05a847;
  --red:        #e05555;
  --section-py: 80px;
}

/* ----------------------------------------------------------
   2. lh-* スコープ内リセット
      WordPress + SWELL の既存リセットと衝突しないよう
      lh-header / lh-sp-nav / lh-footer の中だけに絞る。
   ---------------------------------------------------------- */
.lh-header *, .lh-sp-nav *, .lh-footer * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.lh-header ul, .lh-sp-nav ul, .lh-footer ul {
  list-style: none;
}

.lh-header a, .lh-sp-nav a, .lh-footer a {
  text-decoration: none;
  color: inherit;
}

.lh-header button {
  font-family: inherit;
  cursor: pointer;
  background: none;
  border: none;
}

/* ----------------------------------------------------------
   3. 上部ダークバー（SWELL ヘッダー上部バーに相当）
   ---------------------------------------------------------- */
.lh-topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1001;
  background: #0d2b45;
  color: rgba(255,255,255,.85);
  font-size: 12px;
}

.lh-topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lh-topbar-sub {
  font-size: 11px;
  color: rgba(255,255,255,.75);
  letter-spacing: .05em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lh-topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.lh-topbar-sns {
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.7);
  transition: color .2s;
  line-height: 1;
}

.lh-topbar-sns:hover { color: #fff; }
.lh-topbar-sns--line:hover { color: #06c755; }

@media (max-width: 768px) {
  .lh-topbar { display: none; }  /* SP では非表示 */
}

/* ----------------------------------------------------------
   4. ヘッダー（front-page.php の .lh-header と完全一致）
   ---------------------------------------------------------- */
.lh-header {
  position: fixed;
  top: 36px; /* .lh-topbar の高さ分下げる */
  left: 0; right: 0;
  z-index: 1000;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(0,119,182,.1);
}

.lh-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 72px;
}

.lh-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.lh-logo-icon {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--ocean), var(--sky));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.lh-logo-text .en {
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--sky);
  font-weight: 700;
  display: block;
}

.lh-logo-text .ja {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  display: block;
}

/* wp_nav_menu() 出力（<ul><li><a>）に合わせたスタイル */
.lh-nav > ul {
  display: flex;
  list-style: none;
  gap: 4px;
}

.lh-nav > ul > li > a {
  display: block;
  padding: 8px 14px;
  color: var(--gray);
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
  transition: color .2s, background .2s;
}

.lh-nav > ul > li > a:hover {
  color: var(--ocean);
  background: var(--pale);
}

/* メニューの最後のアイテムをCTAボタン化
   管理画面で「お問い合わせ」に CSS クラス lh-nav-cta を付けてもよい */
.lh-nav > ul > li:last-child > a,
.lh-nav > ul > li > a.lh-nav-cta {
  background: linear-gradient(135deg, var(--ocean), var(--sky));
  color: #fff;
  font-weight: 700;
  border-radius: 8px;
}

.lh-nav > ul > li:last-child > a:hover,
.lh-nav > ul > li > a.lh-nav-cta:hover {
  opacity: .9;
  color: #fff;
  transform: translateY(-1px);
}

/* 現在のページ */
.lh-nav > ul > li.current-menu-item > a,
.lh-nav > ul > li.current_page_item > a {
  color: var(--ocean);
  background: var(--pale);
}

/* ハンバーガーボタン */
.lh-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
}

.lh-hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--ocean);
  border-radius: 2px;
  transition: transform .25s, opacity .2s;
}

.lh-hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.lh-hamburger.is-open span:nth-child(2) { opacity: 0; }
.lh-hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ----------------------------------------------------------
   4. SPナビ（front-page.php の .lh-sp-nav と完全一致）
   ---------------------------------------------------------- */
.lh-sp-nav {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 999;
}

.lh-sp-nav.is-open {
  display: block;
}

.lh-sp-nav-inner {
  position: absolute;
  top: 0; right: 0;
  width: 280px; height: 100%;
  background: #fff;
  padding: 80px 24px 40px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}

/* wp_nav_menu() 出力（<ul><li><a>）*/
.lh-sp-nav-inner > ul {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lh-sp-nav-inner ul li a,
.lh-sp-nav-inner > a {
  display: block;
  padding: 14px 16px;
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  border-radius: 8px;
  transition: background .2s, color .2s;
}

.lh-sp-nav-inner ul li a:hover,
.lh-sp-nav-inner > a:hover {
  background: var(--pale);
  color: var(--ocean);
}

/* SPナビの最後のアイテムをCTAに */
.lh-sp-nav-inner ul li:last-child a {
  background: linear-gradient(135deg, var(--ocean), var(--sky));
  color: #fff;
  font-weight: 700;
  margin-top: 8px;
}

.lh-sp-nav-inner ul li:last-child a:hover {
  opacity: .9;
  color: #fff;
}

.lh-sp-nav-close {
  position: absolute;
  top: 20px; right: 20px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--gray);
  padding: 4px;
  line-height: 1;
}

/* ----------------------------------------------------------
   5. パンくずリスト
   ---------------------------------------------------------- */
.lh-breadcrumb {
  padding-top: 108px; /* topbar(36px) + header(72px) */
  background: var(--pale);
}

@media (max-width: 768px) {
  .lh-breadcrumb { padding-top: 72px; } /* SP: topbar非表示 */
}

.lh-breadcrumb__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 24px;
  font-size: 12px;
  color: var(--gray);
}

.lh-breadcrumb__inner a { color: var(--gray); }
.lh-breadcrumb__inner a:hover { color: var(--ocean); }
.lh-breadcrumb__sep { margin-inline: 6px; }

/* ----------------------------------------------------------
   6. 共通ボタン（全ページで使う場合に lh-common.css で定義）
   ---------------------------------------------------------- */
.btn-ocean {
  display: inline-block;
  padding: 14px 36px;
  background: linear-gradient(135deg, var(--ocean), var(--sky));
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  border-radius: 30px;
  box-shadow: 0 4px 20px rgba(0,119,182,.4);
  transition: transform .3s, box-shadow .3s;
  letter-spacing: .5px;
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.btn-ocean:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(0,119,182,.5);
  color: #fff;
}

.btn-white {
  display: inline-block;
  padding: 13px 36px;
  background: #fff;
  color: var(--ocean);
  font-weight: 700;
  font-size: 15px;
  border-radius: 30px;
  box-shadow: 0 2px 12px rgba(0,0,0,.1);
  transition: transform .3s, border-color .3s;
  letter-spacing: .5px;
  border: 2px solid var(--light-blue);
  text-decoration: none;
}

.btn-white:hover {
  transform: translateY(-2px);
  border-color: var(--ocean);
  color: var(--ocean);
}

.btn-line {
  display: inline-block;
  padding: 14px 32px;
  background: var(--line-green);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  border-radius: 30px;
  box-shadow: 0 4px 16px rgba(6,199,85,.35);
  transition: background .3s, transform .3s, box-shadow .3s;
  letter-spacing: .5px;
  text-decoration: none;
}

.btn-line:hover {
  background: var(--line-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(6,199,85,.45);
}

/* ----------------------------------------------------------
   7. フッター（front-page.php の .lh-footer と完全一致）
   ---------------------------------------------------------- */
.lh-footer {
  background: linear-gradient(135deg, #023e8a 0%, #0077b6 100%);
  color: rgba(255,255,255,.8);
  font-family: 'Noto Sans JP', 'Hiragino Kaku Gothic ProN', sans-serif;
}

.footer-wave {
  width: 100%;
  height: 60px;
  background: var(--white);
  clip-path: ellipse(55% 100% at 50% 0);
}

.footer-top {
  max-width: 1200px;
  margin: 0 auto;
  padding: 50px 24px 40px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}

.footer-logo .en {
  font-size: 9px;
  letter-spacing: 3px;
  color: var(--light-blue);
  font-weight: 700;
  display: block;
  margin-bottom: 6px;
}

.footer-logo .ja {
  font-size: 16px;
  font-weight: 900;
  color: #fff;
  display: block;
  margin-bottom: 14px;
}

.footer-logo p {
  font-size: 12px;
  color: rgba(255,255,255,.65);
  line-height: 2;
}

.footer-nav h4 {
  font-size: 12px;
  font-weight: 700;
  color: var(--light-blue);
  margin-bottom: 16px;
  letter-spacing: 1px;
}

/* wp_nav_menu() 出力対応 */
.footer-nav > ul,
.footer-nav ul {
  list-style: none;
}

.footer-nav ul li {
  margin-bottom: 10px;
}

.footer-nav ul li a {
  font-size: 13px;
  color: rgba(255,255,255,.7);
  transition: color .2s, padding-left .2s;
  display: flex;
  align-items: center;
  gap: 6px;
}

.footer-nav ul li a::before {
  content: '›';
  color: var(--light-blue);
  flex-shrink: 0;
}

.footer-nav ul li a:hover {
  color: #fff;
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.15);
  padding: 20px 24px;
  text-align: center;
  font-size: 11px;
  color: rgba(255,255,255,.4);
}

/* ----------------------------------------------------------
   8. SWELL 標準「上に戻る」ボタン のカラーオーバーライド
      Appearance > Customize で有効化後、ブランドカラーに合わせる
   ---------------------------------------------------------- */
.c-pageTop {
  background: linear-gradient(135deg, var(--ocean), var(--sky)) !important;
  border-color: transparent !important;
}

.c-pageTop:hover {
  opacity: .85 !important;
  transform: translateY(-2px) !important;
}

/* ----------------------------------------------------------
   9. レスポンシブ
   ---------------------------------------------------------- */
@media (max-width: 1024px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }
}

@media (max-width: 768px) {
  .lh-nav { display: none; }
  .lh-hamburger { display: flex; }
  .lh-header { top: 0; } /* SP: トップバー非表示のためヘッダーを上端に */

  :root { --section-py: 60px; }
}

@media (max-width: 640px) {
  .footer-top {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}
