/*
Theme Name: hiyoko base
Theme URI: https://hiyokobase.example/
Author: hiyoko base development team
Description: hiyoko base オリジナルテーマ（8.3短ファイル名対応版・ハンバーガー対応）。
Version: 1.0.92
Requires at least: 6.0
Requires PHP: 8.0
License: GPL v2 or later
Text Domain: hiyokobase
*/

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* 下層ページのヒーロー背景（cream sectionに自動で適用）
 * 写真をうっすら残しつつ、文字が確実に読めるよう強めにマスク。
 * 左側（文字が乗る側）を濃く、右側で少し透過させて写真を感じさせる。 */
section[style*="background:#f7f3ea"] {
  position: relative;
  overflow: hidden;
  min-height: 300px;
}
section[style*="background:#f7f3ea"]::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url('assets/cozy-van-interior-prepared-camping.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.35; /* 写真の主張を少し戻して雰囲気を出す */
  z-index: 0;
  pointer-events: none;
}
section[style*="background:#f7f3ea"]::after {
  content: "";
  position: absolute;
  inset: 0;
  /* 左70% → 右30% のクリームマスク。テキスト側は読める強さを保ちつつ、右側は写真を活かす */
  background: linear-gradient(90deg,
    rgba(247,243,234,0.78) 0%,
    rgba(247,243,234,0.65) 45%,
    rgba(247,243,234,0.30) 100%);
  z-index: 0;
  pointer-events: none;
}
section[style*="background:#f7f3ea"] > * {
  position: relative;
  z-index: 1;
}
/* h1 / h2 / p にわずかな白影を落として、写真エッジと重なっても輪郭を保つ */
section[style*="background:#f7f3ea"] h1,
section[style*="background:#f7f3ea"] h2,
section[style*="background:#f7f3ea"] p {
  text-shadow: 0 1px 2px rgba(255,253,247,0.7);
}

/* 筆記体フォント統一（Brush Script MT が無いデバイスでも綺麗に表示） */
[style*="Brush Script MT"], [style*="Apple Chancery"] {
  font-family: "Dancing Script","Pacifico","Brush Script MT","Apple Chancery","Snell Roundhand",cursive !important;
  font-weight: 700 !important;
  letter-spacing: 0.01em;
}
@media (max-width: 720px) {
  section[style*="background:#f7f3ea"] {
    min-height: 320px;
    padding-top: 56px !important;
    padding-bottom: 44px !important;
    display: flex;
    align-items: center;
  }
  section[style*="background:#f7f3ea"]::before {
    background-position: center center;
    opacity: 0.28; /* スマホは少し控えめ */
  }
  section[style*="background:#f7f3ea"]::after {
    background: linear-gradient(180deg,
      rgba(247,243,234,0.78) 0%,
      rgba(247,243,234,0.62) 100%);
  }
}
body {
  font-family: "Hiragino Kaku Gothic ProN","Yu Gothic","Yu Gothic Medium","Meiryo",sans-serif;
  background: #fdfaf3; color: #2a2a2a; line-height: 1.7; font-size: 15px;
}
img { max-width: 100%; display: block;}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container { max-width: 1240px; margin: 0 auto; padding: 0 28px; }
/* 画像はテンプレ側のサイズ指定に従う。グローバル固定height（400px）は削除 */
.container img { object-fit: cover; height: auto; max-width: 100%; }
/* ヒーロー画像など特定箇所だけ大型表示したい場合は .hb-feature-img を付与 */
.container .hb-feature-img { height: 400px; }

/* ===== Header（白丸ピル） ===== */
.header {
  position: sticky; top: 16px; z-index: 100; padding: 0 24px; margin-top: 16px;
}
.header-inner {
  max-width: 1240px; margin: 0 auto;
  background: #fff; border-radius: 100px;
  box-shadow: 0 10px 30px rgba(40, 30, 20, 0.08);
  padding: 14px 18px 14px 32px;
  display: flex; justify-content: space-between; align-items: center; gap: 18px;
}
.logo { font-weight: 900; font-size: 22px; letter-spacing: -0.01em; color: #2a2a2a; line-height: 1.2; }
.logo small { display: block; font-size: 9.5px; letter-spacing: 0.32em; opacity: 0.5; font-weight: 700; margin-top: 2px; }
.gnav { display: flex; gap: 22px; flex: 1; justify-content: center; flex-wrap: nowrap; white-space: nowrap; }
.gnav a { font-size: 13.5px; font-weight: 700; color: #2a2a2a; transition: color 0.2s; white-space: nowrap; }
@media (max-width: 1100px) { .gnav { gap: 16px; } .gnav a { font-size: 12.5px; } }
@media (max-width: 960px)  { .gnav { gap: 12px; } .gnav a { font-size: 12px; } }
.gnav a:hover, .gnav a.current-menu-item { color: #ec8a3a; }
.btn-primary {
  background: #ec8a3a; color: #fff; padding: 12px 26px; border-radius: 999px;
  font-size: 13.5px; font-weight: 700; display: inline-block;
  transition: background 0.2s, transform 0.2s;
}
.btn-primary:hover { background: #d77428; transform: translateY(-1px); }

/* ===== ハンバーガーボタン ===== */
.hamburger {
  display: none;
  width: 44px; height: 44px;
  background: transparent; border: 0;
  cursor: pointer; padding: 0;
  position: relative; z-index: 102;
}
.hamburger span {
  display: block; position: absolute; left: 10px; right: 10px;
  height: 2px; background: #2a2a2a; border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease, top 0.3s ease;
}
.hamburger span:nth-child(1) { top: 15px; }
.hamburger span:nth-child(2) { top: 21px; }
.hamburger span:nth-child(3) { top: 27px; }
.hamburger.is-active span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.hamburger.is-active span:nth-child(2) { opacity: 0; }
.hamburger.is-active span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

/* ===== モバイルドロワー ===== */
.mobile-drawer {
  display: none;
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(42, 40, 32, 0.6); backdrop-filter: blur(6px);
  z-index: 101;
}
.mobile-drawer.is-open { display: block; animation: ugoFade 0.25s ease; }
@keyframes ugoFade { from { opacity: 0; } to { opacity: 1; } }
.mobile-drawer-inner {
  position: absolute; top: 0; right: 0;
  width: 86%; max-width: 360px; height: 100%;
  background: #fdfaf3; padding: 60px 28px 32px;
  overflow-y: auto;
  animation: ugoSlide 0.3s ease;
}
@keyframes ugoSlide { from { transform: translateX(100%); } to { transform: translateX(0); } }
.drawer-close {
  position: absolute; top: 18px; right: 20px;
  background: transparent; border: 0; font-size: 32px; cursor: pointer; padding: 0;
  color: #2a2a2a; line-height: 1; font-weight: 300;
}
.drawer-logo { font-weight: 900; font-size: 22px; margin-bottom: 28px; }
.drawer-logo small { display: block; font-size: 10px; letter-spacing: 0.3em; opacity: 0.5; font-weight: 700; margin-top: 4px; }
.drawer-nav { display: flex; flex-direction: column; gap: 4px; margin-bottom: 24px; }
.drawer-nav a {
  font-size: 15px; font-weight: 700; padding: 16px 0;
  border-bottom: 1px solid #ebe6d8; color: #2a2a2a;
  display: flex; justify-content: space-between; align-items: center;
}
.drawer-nav a::after { content: '›'; font-size: 18px; color: #ec8a3a; }
/* drawer CTAs — 詳細は header.php の <style> にて .drawer-cta / .drawer-social で統一 */
.drawer-cta,
.drawer-social {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px; border-radius: 999px;
  color: #fff; text-align: center; text-decoration: none;
  font-weight: 900; font-size: 14px; letter-spacing: 0.02em;
  border: 0; box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  margin-top: 10px;
}
.drawer-cta { background: #ec8a3a; }
.drawer-line { background: #06c755; }
.drawer-ig   { background: #e04a5c; }

body.admin-bar .header { top: 48px; }
@media (max-width: 782px) {
  body.admin-bar .header { top: 62px; }
}

/* ===== Hero ===== */
.hero { padding: 5px 28px 0; background: linear-gradient(180deg, #fdfaf3, #fdfaf3 60%, #d8e6dc); }
.hero-inner { max-width: 1320px; margin: 0 auto; display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 30px; align-items: center; min-height: 540px; }
.hero-text h1, .hero-text h2 { font-family: "Yu Mincho","YuMincho","Hiragino Mincho ProN",serif; font-size: clamp(40px, 5.5vw, 68px); font-weight: 600; line-height: 1.4; letter-spacing: 0.04em; margin-bottom: 28px; }
.hero-h1 { display: flex; flex-direction: column; }
.hero-h1-catch { font-family: "Yu Mincho","YuMincho","Hiragino Mincho ProN",serif; font-weight: 600; }
.hero-h1-sub { font-family: "Hiragino Kaku Gothic ProN",sans-serif; font-size: 13px; font-weight: 700; letter-spacing: 0.04em; color: #5e7d57; margin-top: 12px; opacity: 0.9; }
.hero-desc { font-size: 14.5px; line-height: 2.1; margin-bottom: 32px; opacity: 0.85; }
.hero-script { font-family: "Brush Script MT","Apple Chancery","Snell Roundhand",cursive; font-size: 38px; color: #5e7d57; transform: rotate(-3deg); display: inline-block; margin-left: 16px; }
.hero-image img { width: 100%; height: 560px; object-fit: cover; border-radius: 50% 24px 24px 50% / 60% 24px 24px 60%; box-shadow: 0 30px 60px rgba(40, 30, 20, 0.12); }

.section { padding: 80px 28px; }
.section h2 { font-family: "Hiragino Kaku Gothic ProN",sans-serif; font-size: clamp(28px, 4vw, 40px); font-weight: 900; letter-spacing: -0.01em; margin-bottom: 16px; }

.vehicle-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.vehicle-card { background: #fff; border-radius: 20px; overflow: hidden; box-shadow: 0 4px 14px rgba(40, 30, 20, 0.05); transition: transform 0.3s; }
.vehicle-card:hover { transform: translateY(-4px); }
.vehicle-thumb img { width: 100%; height: 280px; object-fit: cover; }
.vehicle-body { padding: 22px; }
.vehicle-cat { font-size: 11px; font-weight: 900; color: #5e7d57; letter-spacing: 0.06em; }
.vehicle-name { font-size: 22px; font-weight: 900; margin: 6px 0 10px; }
.vehicle-price { font-size: 22px; font-weight: 900; color: #ec8a3a; }

.site-footer { background: #2a2820; color: rgba(255,255,255,0.75); padding: 56px 28px 24px; font-size: 13px; }
.site-footer .container { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 36px; margin-bottom: 32px; }
.site-footer h4 { color: #fff; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; margin-bottom: 14px; }
.site-footer a:hover { color: #ec8a3a; }
.site-footer .credits { padding-top: 18px; border-top: 1px solid rgba(255,255,255,0.15); font-size: 11px; opacity: 0.6; }

@media (max-width: 980px) {
  .header { top: 12px; margin-top: 12px; padding: 0 18px; }
  .header-inner { padding: 12px 14px 12px 22px; gap: 10px; }
  .gnav { gap: 12px; flex-wrap: nowrap; }
  .hero-inner { grid-template-columns: 1fr; gap: 30px; min-height: 0; }
  .hero-image img { height: 380px; border-radius: 36px; }
  .vehicle-grid { grid-template-columns: 1fr 1fr; }
  .site-footer .container { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  /* === ヘッダー === */
  .gnav { display: none !important; }
  .header-inner > .btn-primary { display: none; }
  .hamburger { display: block !important; }
  .header { padding: 0 12px; margin-top: 10px; top: 10px; }
  .header-inner { padding: 10px 8px 10px 20px; }
  .logo { font-size: 18px; }
  .logo small { font-size: 8.5px; letter-spacing: 0.28em; }

  /* === コンテナ・セクション === */
  .container { padding: 0 16px !important; }
  .container img { height: auto; max-height: 280px; }
  .section { padding: 40px 16px; }
  .section h2 { font-size: clamp(22px, 6vw, 28px); }

  /* === ヒーロー === */
  .hero { padding: 24px 16px 0; }
  .hero-inner { grid-template-columns: 1fr !important; gap: 24px; min-height: 0; padding-bottom: 32px; }
  .hero-text h1, .hero-text h2 { font-size: clamp(32px, 9vw, 44px) !important; margin-bottom: 18px; }
  .hero-h1-sub { font-size: 11px !important; margin-top: 8px !important; }
  .hero-desc { font-size: 13.5px; line-height: 1.95; margin-bottom: 20px; }
  .hero-script { font-size: 28px; margin-left: 8px; }
  .hero-image img { height: 260px; border-radius: 24px; }

  /* === 車両グリッド === */
  .vehicle-grid { grid-template-columns: 1fr !important; gap: 18px; }
  .vehicle-thumb img { height: 220px; }
  .vehicle-body { padding: 18px; }
  .vehicle-name { font-size: 18px; }
  .vehicle-price { font-size: 18px; }

  /* === フッター === */
  .site-footer { padding: 40px 16px 18px; }
  .site-footer .container { grid-template-columns: 1fr !important; gap: 24px; padding: 0 !important; }

  /* === インラインgridを全部1列にする === */
  [style*="grid-template-columns:repeat(4,1fr)"],
  [style*="grid-template-columns:repeat(3,1fr)"],
  [style*="grid-template-columns:repeat(2,1fr)"],
  [style*="grid-template-columns: repeat(4, 1fr)"],
  [style*="grid-template-columns: repeat(3, 1fr)"],
  [style*="grid-template-columns: repeat(2, 1fr)"],
  [style*="grid-template-columns:1fr 1fr"],
  [style*="grid-template-columns: 1fr 1fr"],
  [style*="grid-template-columns:1.2fr 1fr"],
  [style*="grid-template-columns:1.1fr 1fr"],
  [style*="grid-template-columns: 1.2fr 1fr"],
  [style*="grid-template-columns:0.85fr 1.4fr"],
  [style*="grid-template-columns:0.9fr 1.1fr"],
  [style*="grid-template-columns:280px 1fr"],
  [style*="grid-template-columns:140px 1fr"],
  [style*="grid-template-columns:130px"],
  [style*="grid-template-columns:auto 1fr auto"],
  [style*="grid-template-columns:1.6fr 1fr 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* === ギャラリーは小さくして2列キープ === */
  [style*="grid-template-columns:repeat(auto-fill,minmax(140px,1fr))"],
  [style*="grid-template-columns:repeat(auto-fit,minmax(160px,1fr))"] {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }

  /* === gapも狭める === */
  [style*="gap:48px"] { gap: 20px !important; }
  [style*="gap:36px"] { gap: 18px !important; }
  [style*="gap:32px"] { gap: 18px !important; }
  [style*="gap:28px"] { gap: 16px !important; }
  [style*="gap:24px"] { gap: 14px !important; }
  [style*="gap:18px"] { gap: 12px !important; }

  /* === paddingを縮小（カード系） === */
  [style*="padding:32px"] { padding: 20px !important; }
  [style*="padding:24px"] { padding: 18px !important; }

  /* === セクション縦paddingも縮小 === */
  [style*="padding:80px 0"] { padding: 40px 0 !important; }
  [style*="padding:64px 0 48px"] { padding: 32px 0 24px !important; }
  [style*="padding:56px 0 40px"] { padding: 32px 0 24px !important; }
  [style*="padding:48px 0"] { padding: 28px 0 !important; }

  /* === flex-wrap を強制 === */
  [style*="display:flex;justify-content:space-between"] { flex-wrap: wrap !important; gap: 12px !important; }

  /* === 大きい見出し縮小 === */
  h1[style*="font-size:32px"], h1[style*="font-size:34px"] { font-size: 24px !important; line-height: 1.35 !important; }
  h1[style*="font-size:30px"] { font-size: 22px !important; line-height: 1.4 !important; }
  h2[style*="font-size:26px"], h2[style*="font-size:24px"] { font-size: 20px !important; }
  p[style*="font-size:32px"] { font-size: 24px !important; }
  p[style*="font-size:28px"] { font-size: 22px !important; }

  /* === テーブル横スクロール === */
  table { font-size: 12px !important; }
  .wrap > div[style*="overflow-x:auto"] table,
  div[style*="overflow-x:auto"] table { min-width: 600px !important; }

  /* === ボタン群を縦並びに === */
  div[style*="display:flex;gap:12px"][style*="justify-content:center"],
  div[style*="display:flex;gap:10px"] {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  a[class="btn-primary"], a.btn-primary { padding: 14px 22px; font-size: 13px; }

  /* === LINEバナー（フッター上） === */
  section[style*="linear-gradient(135deg,#06c755"],
  section[style*="linear-gradient(135deg, #06c755"] {
    padding: 24px 16px !important;
  }

  /* === フローティングLINEボタン === */
  a[style*="position:fixed"][style*="bottom:24px"][style*="right:24px"] {
    bottom: 14px !important; right: 14px !important;
    padding: 12px 18px !important;
    font-size: 12px !important;
  }

  /* === ヒーローCTAボタン === */
  .hero-text > div[style*="display:flex"] { flex-direction: column; gap: 10px !important; }
  .hero-text > div[style*="display:flex"] a { width: 100%; text-align: center; }

  /* === パンくず === */
  nav[aria-label="breadcrumb"] { font-size: 10.5px !important; padding: 10px 0 !important; }

  /* === 予約フォーム === */
  form#ugoForm > div[style*="background:#fdfaf3"] { padding: 16px !important; }
  ol[style*="grid-template-columns:repeat(5,1fr)"] {
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 4px !important;
    font-size: 9.5px !important;
  }
  ol[style*="grid-template-columns:repeat(5,1fr)"] li {
    padding: 8px 2px !important;
    font-size: 9.5px !important;
  }
  div[style*="display:grid;grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
  div[style*="grid-template-columns:repeat(2,1fr);gap:14px"] {
    grid-template-columns: 1fr !important;
  }
  /* 確認テーブル */
  #ugoConfirmTable th { width: 110px !important; padding: 10px !important; font-size: 11px !important; }
  #ugoConfirmTable td { padding: 10px !important; font-size: 12.5px !important; }

  /* === カレンダー === */
  .ugo-cal-full { grid-template-columns: 1fr !important; }
  .ugo-cal-months { grid-template-columns: 1fr !important; }
  .ugo-cal-wrap[data-visible="2"] .ugo-cal-month + .ugo-cal-month { display: none; }
  .ugo-cal-mini { gap: 2px !important; }
  .ugo-cal-mini > div { padding: 3px 0 !important; }

  /* === 比較バー（archive-vehicleの選択中バー） === */
  #cmpBar { padding: 12px 14px !important; }
  #cmpBar .container { gap: 10px !important; }

  /* === ライトボックス === */
  #ugo-lb-prev, #ugo-lb-next { width: 42px !important; height: 42px !important; font-size: 22px !important; }
  #ugo-lb-close { top: 12px !important; right: 12px !important; }

  /* === ギャラリーカード === */
  .feat-grid { grid-template-columns: 1fr !important; gap: 12px !important; }
  .feat-card { aspect-ratio: 16/10 !important; }
  .feat-ttl { font-size: 16px !important; }

  /* === タブ/ピル系のフィルタボタンは横スクロール許可 === */
  div[style*="display:flex;gap:8px;flex-wrap:wrap"],
  div[style*="display:flex;gap:10px;flex-wrap:wrap"] {
    overflow-x: auto;
    flex-wrap: nowrap !important;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }
  div[style*="display:flex;gap:8px;flex-wrap:wrap"] > *,
  div[style*="display:flex;gap:10px;flex-wrap:wrap"] > * {
    flex-shrink: 0;
    white-space: nowrap;
  }
}

@media (max-width: 480px) {
  body { font-size: 14px; }
  .container { padding: 0 12px !important; }
  .section { padding: 32px 12px; }
  .hero-text h1, .hero-text h2 { font-size: 28px !important; }
  .hero-image img { height: 200px; }
  .logo { font-size: 16px; }
  .logo small { font-size: 8px; letter-spacing: 0.22em; }
  .vehicle-thumb img { height: 180px; }
  .header-inner { padding: 8px 6px 8px 16px; }

  /* 画像 */
  .container img { max-height: 220px; }

  /* SVG/画像で覆ったヒーロー要素 */
  .hero-image img { border-radius: 18px; }
}
