/************************************
** トップのファーストビュー（ヒーロー v3）と予約検索フォーム [et_hero_search]（2026-10-18）
** トップページだけで読み込む（inc-hero-search.php）
************************************/
:root {
  --ehs-navy: #1F3A5F;
  --ehs-navy-dark: #162B47;
  --ehs-cta: #C8412A;          /* 検索ボタン（朱） */
  --ehs-cta-hover: #A8361F;
  --ehs-line: #CFD6DF;
  --ehs-soft: #F4F6F9;
  --ehs-text: #1A1D23;
  --ehs-sub: #5B6270;
  --ehs-error: #B42318;
}

/* ---------- ヒーロー ---------- */
.et-hero.et-hero-v3 {
  padding-top: 72px;
  padding-bottom: 72px;
  text-align: center;
  background-image:
    linear-gradient(180deg, rgba(16, 31, 52, 0.78) 0%, rgba(20, 38, 64, 0.62) 55%, rgba(20, 38, 64, 0.82) 100%),
    url("images/home-hero-photo.jpg");
  background-position: center, center 60%;
}
.et-hero-v3 .et-inner { max-width: 1160px; margin: 0 auto; }
.article .et-hero.et-hero-v3 .et-hero-title {
  font-size: clamp(32px, 4.6vw, 56px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  max-width: 20ch;
  margin: 0 auto 14px !important;
  text-wrap: balance;
}
.et-hero.et-hero-v3 .et-hero-lead {
  max-width: 640px;
  margin: 0 auto 32px !important;
  font-size: 18px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
  text-wrap: balance;
}

/* ---------- 検索フォーム ---------- */
.ehs {
  text-align: left;
  color: var(--ehs-text);
  font-family: var(--et-font-body, system-ui, sans-serif);
}
.ehs-tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 12px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.ehs-tabs::-webkit-scrollbar { display: none; }
.ehs-tab {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  font: 600 15px/1 var(--et-font-heading, system-ui, sans-serif);
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.ehs-tab:hover { background: rgba(255, 255, 255, 0.2); }
.ehs-tab[aria-selected="true"] {
  background: #FFFFFF;
  border-color: #FFFFFF;
  color: var(--ehs-navy);
}
.ehs-tab:focus-visible { outline: 3px solid #FFFFFF; outline-offset: 2px; }
.ehs-tab-icon svg {
  width: 20px;
  height: 20px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ehs-card {
  background: #FFFFFF;
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(8, 18, 34, 0.28);
  padding: 20px;
}
.ehs-panel[hidden] { display: none; }
.ehs-fields {
  display: grid;
  gap: 12px;
  align-items: start;
}
/* 2026-10-21 Hotels は 行き先・チェックイン・チェックアウト・大人・検索ボタン の5つ（Children・Rooms は外した） */
.ehs-panel-hotels .ehs-fields     { grid-template-columns: minmax(200px, 1.8fr) repeat(2, minmax(150px, 1fr)) minmax(136px, .8fr) auto; }
.ehs-panel-activities .ehs-fields { grid-template-columns: minmax(200px, 2fr) minmax(150px, 1fr) minmax(200px, 1.6fr) auto; }
.ehs-panel-transport .ehs-fields  { grid-template-columns: minmax(160px, 1.3fr) minmax(160px, 1.3fr) minmax(140px, 1fr) minmax(180px, 1.4fr) auto; }
.ehs-panel-flights .ehs-fields    { grid-template-columns: minmax(150px, 1.2fr) minmax(150px, 1.2fr) repeat(2, minmax(140px, 1fr)) minmax(124px, .85fr) auto; }
.ehs-panel-cars .ehs-fields       { grid-template-columns: minmax(200px, 2fr) repeat(2, minmax(140px, 1fr)) minmax(100px, .6fr) auto; }

.ehs-field { position: relative; min-width: 0; }
.ehs-label {
  display: block;
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ehs-sub);
  letter-spacing: .01em;
}
.ehs-input {
  box-sizing: border-box;
  width: 100%;
  height: 52px;
  margin: 0;
  padding: 0 14px;
  border: 1px solid var(--ehs-line);
  border-radius: 10px;
  background: #FFFFFF;
  color: var(--ehs-text);
  font: 500 16px/1.2 var(--et-font-body, system-ui, sans-serif);
  transition: border-color .15s ease, box-shadow .15s ease;
}
select.ehs-input {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235B6270' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
}
.ehs-input:hover { border-color: #9AA6B5; }
.ehs-input:focus {
  outline: none;
  border-color: var(--ehs-navy);
  box-shadow: 0 0 0 3px rgba(31, 58, 95, 0.18);
}
.ehs-has-icon .ehs-input { padding-left: 40px; }
.ehs-field-icon {
  position: absolute;
  left: 12px;
  top: 41px;
  width: 20px;
  height: 20px;
  color: var(--ehs-navy);
  pointer-events: none;
}
.ehs-field-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; display: block; }
.ehs-date { padding-right: 8px; }

/* 人数・部屋数の − ＋ */
.ehs-stepper {
  display: flex;
  align-items: center;
  height: 52px;
  border: 1px solid var(--ehs-line);
  border-radius: 10px;
  background: #FFFFFF;
  overflow: hidden;
}
.ehs-stepper:focus-within { border-color: var(--ehs-navy); box-shadow: 0 0 0 3px rgba(31, 58, 95, 0.18); }
.ehs-stepper .ehs-num {
  height: 50px;
  border: 0;
  border-radius: 0;
  padding: 0;
  text-align: center;
  -moz-appearance: textfield;
  box-shadow: none !important;
}
.ehs-stepper .ehs-num::-webkit-inner-spin-button,
.ehs-stepper .ehs-num::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.ehs-step {
  flex: 0 0 44px;
  height: 50px;
  border: 0;
  background: var(--ehs-soft);
  color: var(--ehs-navy);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.ehs-step:hover:not(:disabled) { background: #E6EBF1; }
.ehs-step:disabled { color: #B3BCC7; cursor: default; }
.ehs-step:focus-visible { outline: 2px solid var(--ehs-navy); outline-offset: -2px; }

/* 検索ボタン */
.ehs-field-submit { padding-top: 25px; }
.ehs .ehs-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-width: 168px;
  height: 52px;
  padding: 0 24px;
  border: 0;
  border-radius: 10px;
  background: var(--ehs-cta);
  color: #FFFFFF;
  font: 700 16px/1 var(--et-font-heading, system-ui, sans-serif);
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(200, 65, 42, 0.32);
  transition: background-color .15s ease, transform .15s ease;
}
.ehs .ehs-submit:hover { background: var(--ehs-cta-hover); }
.ehs-submit:active { transform: translateY(1px); }
.ehs-submit:focus-visible { outline: 3px solid var(--ehs-navy); outline-offset: 2px; }
.ehs-submit svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }

/* エラー・注記 */
.ehs-invalid .ehs-input,
.ehs-invalid .ehs-stepper { border-color: var(--ehs-error); }
.ehs-error {
  margin: 6px 0 0 !important;
  font-size: 13px;
  line-height: 1.4;
  color: var(--ehs-error);
  font-weight: 600;
}
.ehs-note {
  margin: 12px 0 0 !important;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ehs-sub);
}
.ehs-note a { color: var(--ehs-navy); font-weight: 600; }
.ehs-noscript { color: #FFFFFF; }

/* ---------- タブレット ---------- */
@media (max-width: 1080px) {
  .ehs .ehs-fields { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .ehs-field-wide, .ehs-field-submit { grid-column: 1 / -1; }
  .ehs-panel-hotels .ehs-field-step,
  .ehs-panel-flights .ehs-field-step { grid-column: auto; }
  .ehs-panel-flights .ehs-field-step { grid-column: 1 / -1; }
  .ehs-field-submit { padding-top: 4px; }
  .ehs-panel-hotels .ehs-fields { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; }
  .ehs-panel-hotels .ehs-field { grid-column: span 2; }
  .ehs-panel-hotels .ehs-field-wide, .ehs-panel-hotels .ehs-field-submit { grid-column: 1 / -1; }
}

/* ---------- スマートフォン ---------- */
@media (max-width: 640px) {
  .et-hero.et-hero-v3 {
    padding-top: 40px;
    padding-bottom: 48px;
    background-image:
      linear-gradient(180deg, rgba(16, 31, 52, 0.82) 0%, rgba(20, 38, 64, 0.72) 100%),
      url("images/home-hero-photo.jpg");
    background-position: center, 70% center;
  }
  .article .et-hero.et-hero-v3 .et-hero-title { font-size: 30px; }
  .et-hero-v3 .et-hero-lead { font-size: 16px; margin-bottom: 20px !important; }
  .ehs-tabs { margin-left: -16px; margin-right: -16px; padding: 0 16px; }
  .ehs-tab { padding: 0 14px; font-size: 14px; }
  .ehs-card { padding: 16px; border-radius: 14px; }
  .ehs .ehs-fields { grid-template-columns: 1fr !important; gap: 10px; }
  .ehs .ehs-field { grid-column: 1 / -1; }
  /* 日付の2つは横に並べて、縦の長さを抑える */
  .ehs-panel-hotels .ehs-fields,
  .ehs-panel-flights .ehs-fields,
  .ehs-panel-cars .ehs-fields { grid-template-columns: 1fr 1fr !important; }
  .ehs .ehs-field:has(.ehs-date) { grid-column: auto; }
  /* 大人は1つだけなので横幅いっぱい（右に空きを作らない） */
  .ehs-panel-hotels .ehs-field-step { grid-column: 1 / -1; }
  .ehs .ehs-date { padding: 0 8px; font-size: 15px; }
  .ehs .ehs-submit { height: 56px; font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  .ehs-tab, .ehs-input, .ehs-submit { transition: none; }
}

/* トップ：自分たちの宿の紹介カード（検索は最上部のフォームに一本化、2026-10-18） */
.et-book-row.et-stay-only { display: block; }
.et-book-row.et-stay-only .et-stay-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  grid-template-rows: auto auto auto 1fr;
  column-gap: 32px;
  align-items: start;
  padding: 24px;
  max-width: 100%;
}
.et-book-row.et-stay-only .et-stay-card > .wp-block-image { grid-row: 1 / -1; margin: 0; }
.et-book-row.et-stay-only .et-stay-card > .wp-block-image img { width: 100%; height: 100%; min-height: 240px; object-fit: cover; border-radius: 10px; }
.et-book-row.et-stay-only .et-stay-card > :not(.wp-block-image) { grid-column: 2; }
.et-book-row.et-stay-only .et-stay-card > .et-entry-label { justify-self: start; }
.et-book-row.et-stay-only .et-stay-card > .wp-block-heading { margin-top: 12px; }
@media (max-width: 767px) {
  .et-book-row.et-stay-only .et-stay-card { display: block; padding: 16px; }
  .et-book-row.et-stay-only .et-stay-card > .wp-block-image img { min-height: 0; height: auto; }
}

/************************************
** ヒーロー v4：明るい水彩の街並み（2026-10-19）
** 「洗練された旅行雑誌 × 日本の水彩イラスト」。左右に街並み・中央は余白の AI イラスト（home-hero-v4.jpg、文字なし）
** 背景が明るくなったので、タイトルは紺、タブは白地に紺。下端はクリーム（#F7F4EA）に溶かし、
** 次のセクション（白）にはクリームから白へのグラデーションでつなぐ（太い区切り線は使わない）
************************************/
.et-hero.et-hero-v3 {
  padding-top: 76px;
  padding-bottom: 120px;
  color: #1F3A5F;
  background-color: #F7F4EA;
  background-image:
    radial-gradient(ellipse 58% 52% at 50% 38%, rgba(247, 244, 234, .82) 0%, rgba(247, 244, 234, .55) 55%, rgba(247, 244, 234, 0) 100%),
    linear-gradient(180deg, rgba(247, 244, 234, 0) 0%, rgba(247, 244, 234, 0) 62%, rgba(247, 244, 234, .85) 86%, #F7F4EA 100%),
    url("images/home-hero-photo.jpg");
  background-size: 100% 100%, 100% 100%, cover;
  background-position: center, center, center top;
  background-repeat: no-repeat;
}
.article .et-hero.et-hero-v3 .et-hero-title { color: #1F3A5F; text-shadow: 0 1px 0 rgba(255, 255, 255, .6); }
.et-hero.et-hero-v3 .et-hero-lead { color: #33445A; }
.et-hero.et-hero-v3 .et-hero-credit { color: #6B7280; }

/* タブ：明るい背景用（白地・紺の文字、選択中は紺地・白の文字） */
.et-hero-v3 .ehs-tab {
  border-color: rgba(31, 58, 95, .16);
  background: rgba(255, 255, 255, .88);
  color: #1F3A5F;
  box-shadow: 0 2px 8px rgba(31, 58, 95, .06);
}
.et-hero-v3 .ehs-tab:hover { background: #FFFFFF; border-color: rgba(31, 58, 95, .35); }
.et-hero-v3 .ehs-tab[aria-selected="true"] { background: #1F3A5F; border-color: #1F3A5F; color: #FFFFFF; }
.et-hero-v3 .ehs-tab:focus-visible { outline-color: #1F3A5F; }
.et-hero-v3 .ehs-card { border: 1px solid #E4DED0; box-shadow: 0 20px 50px rgba(31, 58, 95, .14); }
.et-hero-v3 .ehs-noscript { color: #1F3A5F; }

/* 次のセクション：クリームから白へ自然につなぐ */
.entry-content > .et-hero-v3 + .et-hv3-white { background: linear-gradient(180deg, #F7F4EA 0, #FFFFFF 160px); }

@media (max-width: 640px) {
  .et-hero.et-hero-v3 {
    padding-top: 40px;
    padding-bottom: 72px;
    background-image:
      linear-gradient(180deg, rgba(247, 244, 234, .55) 0%, rgba(247, 244, 234, .78) 30%, rgba(247, 244, 234, .9) 60%, #F7F4EA 100%),
      url("images/home-hero-photo.jpg");
    background-size: 100% 100%, cover;
    background-position: center, center top;
  }
}

/* Restaurants タブ（管理画面でオンにしたときだけ表示、2026-10-19） */
.ehs-panel-restaurants .ehs-fields { grid-template-columns: minmax(200px, 1fr) minmax(200px, 1fr) auto; }
@media (max-width: 640px) {
  .ehs-panel-restaurants .ehs-fields { grid-template-columns: 1fr !important; }
}

/* Hotels タブ：検索するサイト（Booking.com／Agoda／Rakuten Travel） */
.ehs-sites { grid-column: 1 / -1; order: 99; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 2px 0 0; padding: 0; border: 0; min-width: 0; }
.ehs-sites legend { float: left; margin: 0 4px 0 0; padding: 0; font-size: 13px; font-weight: 600; color: #5B6270; }
.ehs-site { position: relative; margin: 0; cursor: pointer; }
.ehs-site input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ehs-site span { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border: 1px solid #D9D3C6; border-radius: 999px; background: #FFFFFF; color: #1F3A5F; font-size: 14px; font-weight: 600; }
.ehs-site input:checked + span { background: #1F3A5F; border-color: #1F3A5F; color: #FFFFFF; }
.ehs-site input:focus-visible + span { outline: 3px solid #1F3A5F; outline-offset: 2px; }
@media (max-width: 1080px) { .ehs-sites { order: 0; } }
/* 2026-10-21 スマホでは「Search on」を上の行にして、サイトのボタンを1行に並べる（Agoda が2行目に落ちないように） */
@media (max-width: 640px) {
  .ehs-sites legend { float: none; width: 100%; margin: 0 0 6px; }
  .ehs-site { flex: 1 1 auto; }
  .ehs-site span { justify-content: center; width: 100%; padding: 0 10px; font-size: 13px; white-space: nowrap; }
  /* 日付2つのラベルの高さをそろえて、入力欄の高さがずれないように */
  .ehs .ehs-fields { align-items: end; }
}
/* 2026-10-21 Restaurants はエリアと料理の2つだけなので、タブレットでも横に並べる */
@media (max-width: 1080px) and (min-width: 641px) {
  .ehs-panel-restaurants .ehs-field-wide { grid-column: auto; }
}

/* 2026-11-09 タブを4つにしたので、スマホでは2列×2段にして全部見えるようにする（横スクロールで Flights が隠れていた） */
@media (max-width: 600px) {
  .ehs .ehs-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; overflow: visible; }
  .ehs .ehs-tab { justify-content: center; width: 100%; }
}

/* 2026-11-09 速度：スマホでは背景写真を幅900pxの軽い版（約170KB、元は約510KB）にする。重ね方は上の指定と同じ */
@media (max-width: 767px) {
  .et-hero.et-hero-v3 {
    background-image:
      radial-gradient(ellipse 58% 52% at 50% 38%, rgba(247, 244, 234, .82) 0%, rgba(247, 244, 234, .55) 55%, rgba(247, 244, 234, 0) 100%),
      linear-gradient(180deg, rgba(247, 244, 234, 0) 0%, rgba(247, 244, 234, 0) 62%, rgba(247, 244, 234, .85) 86%, #F7F4EA 100%),
      url("images/home-hero-photo-750.jpg");
  }
}
@media (max-width: 640px) {
  .et-hero.et-hero-v3 {
    background-image:
      linear-gradient(180deg, rgba(247, 244, 234, .55) 0%, rgba(247, 244, 234, .78) 30%, rgba(247, 244, 234, .9) 60%, #F7F4EA 100%),
      url("images/home-hero-photo-750.jpg");
  }
}
