/* ===== リセット・基本設定 ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'DM Sans', 'Hiragino Sans', 'Meiryo', sans-serif;
  background: #FAF6EF;
  color: #0A2540;
}
a { text-decoration: none; color: inherit; }

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600;9..40,700;9..40,800&family=Raleway:wght@300;400&display=swap');

:root {
  --navy:      #0A2540;
  --navy-mid:  #1A4A80;
  --navy-lt:   #2A7AB0;
  --accent:    #0A6EBD;
  --gold:      #C8A96A;
  --sand:      #FAF6EF;
  --sand-dark: #F0E8D8;
  --white:     #FFFFFF;
  --border:    #E8EEF4;
  --text-sub:  #5A6A7A;
  --text-muted:#9AADBE;
  --line:      #06C755;
}

/* ===== ログイン画面 ===== */
.login-body {
  background: linear-gradient(160deg, #0A2540 0%, #1A4A80 55%, #2A7AB0 100%);
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
}
.login-container {
  background: var(--white); border-radius: 24px; padding: 56px 48px;
  width: 100%; max-width: 420px;
  box-shadow: 0 32px 80px rgba(10,37,64,0.3);
  position: relative; overflow: hidden;
}
.login-container::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--navy), var(--accent), var(--gold), var(--accent), var(--navy));
  background-size: 400% 100%;
  animation: shimmer 4s ease-in-out infinite;
}
@keyframes shimmer {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.login-logo { text-align: center; margin-bottom: 44px; }
.login-logo h1 {
  font-family: 'Raleway', sans-serif;
  font-size: 2.4rem; font-weight: 300; letter-spacing: 0.35em;
  color: var(--navy);
}
.login-logo .tagline {
  font-size: 0.72rem; letter-spacing: 0.45em; color: var(--text-sub);
  margin-top: 6px; font-weight: 600; text-transform: uppercase;
}
.login-logo .divider {
  width: 60px; height: 2px; margin: 14px auto 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.form-group { margin-bottom: 22px; }
.form-group label {
  display: block; font-size: 0.72rem; font-weight: 700; color: var(--text-sub);
  margin-bottom: 8px; letter-spacing: 0.1em; text-transform: uppercase;
}
.form-group input {
  width: 100%; padding: 14px 16px; border: 1.5px solid var(--border);
  border-radius: 10px; font-size: 1rem; background: white;
  transition: border-color 0.2s, box-shadow 0.2s; color: var(--navy);
  font-family: inherit;
}
.form-group input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(10,110,189,0.12);
}
.error-message {
  background: #fff5f5; border: 1px solid #fcc; color: #c00;
  padding: 12px 16px; border-radius: 10px; font-size: 0.875rem; margin-bottom: 16px;
}
.btn-login {
  width: 100%; padding: 15px; border: none; border-radius: 10px;
  font-size: 0.95rem; font-weight: 700; cursor: pointer;
  letter-spacing: 0.05em; color: var(--white);
  background: linear-gradient(135deg, var(--navy), var(--navy-mid));
  transition: opacity 0.2s, transform 0.15s;
  box-shadow: 0 4px 18px rgba(10,37,64,0.35);
  font-family: inherit;
}
.btn-login:hover { opacity: 0.9; transform: translateY(-1px); }
.login-note { text-align: center; margin-top: 22px; font-size: 0.78rem; color: var(--text-muted); }

/* ===== ヘッダー（検索ページ） ===== */
.site-header {
  background: var(--navy); color: white; padding: 0 28px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 2px 12px rgba(10,37,64,0.2);
}
.header-inner {
  max-width: 1440px; margin: 0 auto; display: flex;
  align-items: center; justify-content: space-between; height: 62px;
}
.header-logo { display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.header-logo h1 {
  font-family: 'Raleway', sans-serif;
  font-size: 1.2rem; font-weight: 300; letter-spacing: 0.25em; line-height: 1;
  color: white;
}
.header-logo .header-tagline {
  font-size: 0.58rem; letter-spacing: 0.3em; color: rgba(255,255,255,0.4);
  text-transform: uppercase;
}
.header-meta { display: flex; align-items: center; gap: 16px; font-size: 0.8rem; color: rgba(255,255,255,0.5); }
.hotel-count strong { color: rgba(255,255,255,0.85); font-size: 1rem; }
.last-update { font-size: 0.72rem; }
.btn-logout, .btn-back {
  background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.75);
  padding: 7px 16px; border-radius: 20px; font-size: 0.78rem;
  border: 1px solid rgba(255,255,255,0.15); transition: all 0.2s;
}
.btn-logout:hover, .btn-back:hover { background: rgba(255,255,255,0.18); color: white; }

/* ===== 検索エリア ===== */
.search-section {
  background: var(--white); border-bottom: 1px solid var(--border); padding: 20px 28px;
}
.search-form { max-width: 1440px; margin: 0 auto; }
.search-main { display: flex; gap: 10px; margin-bottom: 12px; }
.search-input {
  flex: 1; padding: 13px 18px; border: 1.5px solid var(--border); border-radius: 10px;
  font-size: 0.95rem; background: white; color: var(--navy); transition: all 0.2s;
  font-family: inherit;
}
.search-input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(10,110,189,0.1);
}
.btn-search {
  padding: 13px 28px; border: none; border-radius: 10px;
  font-size: 0.9rem; font-weight: 700; cursor: pointer;
  white-space: nowrap; color: var(--white);
  background: var(--navy);
  box-shadow: 0 2px 10px rgba(10,37,64,0.25);
  transition: opacity 0.2s, transform 0.15s;
  font-family: inherit;
}
.btn-search:hover { opacity: 0.88; transform: translateY(-1px); }
.search-filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.filter-select, .filter-input {
  padding: 9px 14px; border: 1.5px solid var(--border); border-radius: 8px;
  font-size: 0.85rem; background: white; color: var(--navy); font-family: inherit;
}
.filter-select:focus, .filter-input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(10,110,189,0.08);
}
.btn-clear {
  color: var(--text-sub); font-size: 0.85rem; padding: 9px 14px;
  border: 1.5px solid var(--border); border-radius: 8px;
  background: white; cursor: pointer; font-family: inherit;
}
.btn-clear:hover { background: var(--sand); }

/* ===== メインコンテンツ ===== */
.main-content { max-width: 1440px; margin: 0 auto; padding: 28px; }
.result-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.result-count { font-size: 0.9rem; color: var(--text-sub); }
.result-count strong { color: var(--navy); font-size: 1.1rem; }
.btn-scrape {
  padding: 9px 18px; background: var(--sand); color: var(--navy);
  border: 1.5px solid var(--border); border-radius: 8px; font-size: 0.82rem;
  cursor: pointer; font-weight: 700; transition: all 0.2s; font-family: inherit;
}
.btn-scrape:hover { background: var(--sand-dark); border-color: var(--navy); }
.btn-scrape:disabled { opacity: 0.4; cursor: not-allowed; }

/* ===== ホテルカードグリッド ===== */
.hotel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }

/* ===== 写真あり／なし 混在レイアウト ===== */
.hotel-mixed-list { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.hotel-mixed-list .hotel-card { flex: 0 0 calc(33.333% - 14px); min-width: 260px; }

/* ── 写真なし行 ── */
.hotel-row {
  flex: 0 0 100%;
  display: flex; align-items: center; gap: 16px;
  background: white; border-radius: 12px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--navy);
  padding: 14px 20px;
  text-decoration: none; color: inherit;
  transition: box-shadow 0.2s, border-left-color 0.2s;
}
.hotel-row:hover {
  box-shadow: 0 4px 20px rgba(10,37,64,0.1);
  border-left-color: var(--accent);
}
.search-submit-row {
  margin-top: 12px;
  display: flex; justify-content: center;
}
.btn-search-bottom {
  background: linear-gradient(135deg, var(--navy), #1a4070);
  color: #fff; border: none; border-radius: 10px;
  padding: 14px 48px; font-size: 1rem; font-weight: 700;
  cursor: pointer; min-width: 240px;
  transition: opacity .2s, transform .15s;
  box-shadow: 0 4px 16px rgba(10,37,64,0.18);
}
.btn-search-bottom:hover { opacity: 0.92; transform: translateY(-1px); }
@media (max-width: 640px) {
  .btn-search-bottom { width: 100%; min-width: 0; padding: 16px; font-size: 1.05rem; }
}

.hotel-row-icon {
  flex-shrink: 0; width: 56px; height: 56px;
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  color: var(--navy); font-size: 0.58rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  letter-spacing: 0.5px; padding: 4px; overflow: hidden;
}
.hotel-row-icon img { display: block; }
.hotel-row-info { flex: 1; min-width: 0; }
.hotel-row-name { font-size: 0.95rem; font-weight: 700; color: var(--navy); margin-bottom: 3px; }
.hotel-row-meta { font-size: 0.78rem; color: var(--text-muted); }
.hotel-row-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.btn-row-detail {
  font-size: 0.78rem; font-weight: 700; color: white;
  background: var(--navy); border-radius: 20px;
  padding: 6px 14px; white-space: nowrap;
  transition: background 0.2s;
}
.hotel-row:hover .btn-row-detail { background: var(--accent); }

.hotel-card {
  background: white; border-radius: 14px; overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(10,37,64,0.06);
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex; flex-direction: column;
}
.hotel-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 0 0 2px var(--navy), 0 16px 40px rgba(10,37,64,0.15);
}

.hotel-card-image { position: relative; height: 210px; overflow: hidden; }
.hotel-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.hotel-card:hover .hotel-card-image img { transform: scale(1.05); }
.hotel-card-image::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 60px;
  background: linear-gradient(transparent, rgba(10,37,64,0.35));
  pointer-events: none;
}
.hotel-card-overlay { position: absolute; top: 12px; left: 12px; z-index: 1; }

.hotel-card-no-image {
  height: 90px;
  background: linear-gradient(135deg, var(--navy), var(--navy-mid));
  display: flex; align-items: center; padding: 16px;
}

.hotel-card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.hotel-name { font-size: 0.95rem; font-weight: 700; margin-bottom: 5px; line-height: 1.45; color: var(--navy); }
.hotel-brand { font-size: 0.78rem; color: var(--text-sub); margin-bottom: 6px; }
.hotel-location { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 14px; }
.hotel-card-footer { margin-top: auto; }
.view-detail {
  font-size: 0.8rem; color: var(--accent); font-weight: 700;
  position: relative;
}
.view-detail::after {
  content: ''; position: absolute; bottom: -2px; left: 0; width: 0; height: 1.5px;
  background: var(--accent); transition: width 0.25s;
}
.hotel-card:hover .view-detail::after { width: 100%; }

/* ===== バッジ ===== */
.hotel-group-badge {
  background: rgba(10,37,64,0.75); color: white; font-size: 0.65rem;
  padding: 4px 10px; border-radius: 20px; font-weight: 700;
  backdrop-filter: blur(6px);
}
.hotel-group-badge.large { font-size: 0.78rem; padding: 5px 14px; background: var(--navy); }
.category-badge { display: none; }
.multi-program-tag {
  font-size: 0.68rem; font-weight: 700; color: var(--accent);
  background: rgba(10,110,189,0.1); border: 1px solid rgba(10,110,189,0.25);
  border-radius: 20px; padding: 2px 10px; display: inline-block; margin-bottom: 4px;
}

/* ===== 検索結果なし ===== */
.no-results { text-align: center; padding: 80px 20px; color: var(--text-muted); }
.no-results p { margin-bottom: 8px; font-size: 0.95rem; }

/* ===== 詳細ページ ===== */
.detail-main { min-height: calc(100vh - 62px); }

.gallery-wrap {
  position: relative; width: 100%; height: 520px; background: var(--navy); overflow: hidden;
}
.gallery-wrap::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  z-index: 2;
}
.gallery-slider { width: 100%; height: 100%; }
.gallery-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 0.7s ease; }
.gallery-slide.active { opacity: 1; }
.gallery-slide img { width: 100%; height: 100%; object-fit: cover; }
.gallery-caption {
  position: absolute; bottom: 6px; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(10,37,64,0.7));
  color: rgba(255,255,255,0.8); padding: 36px 28px 20px; font-size: 0.82rem;
}
.gallery-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(10,37,64,0.5); backdrop-filter: blur(8px);
  color: white; border: 1px solid rgba(255,255,255,0.25);
  width: 50px; height: 50px; border-radius: 50%; font-size: 1.6rem;
  cursor: pointer; transition: all 0.2s; display: flex; align-items: center; justify-content: center;
  z-index: 3;
}
.gallery-btn:hover { background: rgba(10,37,64,0.75); }
.gallery-btn.prev { left: 20px; }
.gallery-btn.next { right: 20px; }
.gallery-dots {
  position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 8px; z-index: 3;
}
.dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(255,255,255,0.35); cursor: pointer; transition: all 0.25s;
}
.dot.active { background: white; transform: scale(1.4); }

.detail-container { max-width: 860px; margin: 0 auto; padding: 36px 28px; }

.detail-header {
  background: white; border-radius: 20px; padding: 32px 36px;
  margin-bottom: 24px; border: 1px solid var(--border);
  box-shadow: 0 2px 16px rgba(10,37,64,0.07);
  position: relative; overflow: hidden;
}
.detail-header::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--navy), var(--accent), var(--gold), var(--accent), var(--navy));
  background-size: 400% 100%; animation: shimmer 4s ease-in-out infinite;
}
.detail-badges { display: flex; gap: 8px; margin-bottom: 16px; }
.detail-hotel-name { font-size: 1.9rem; font-weight: 800; color: var(--navy); margin-bottom: 8px; line-height: 1.3; }
.detail-brand { font-size: 0.95rem; color: var(--text-sub); margin-bottom: 10px; }
.detail-location { display: flex; gap: 10px; flex-wrap: wrap; font-size: 0.88rem; color: var(--text-muted); }
.detail-location span:not(:last-child)::after { content: '·'; margin-left: 10px; color: var(--border); }

.benefits-section {
  background: white; border-radius: 20px; padding: 32px 36px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 16px rgba(10,37,64,0.07);
  position: relative; overflow: hidden;
}
.benefits-section::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--navy), var(--accent), var(--gold), var(--accent), var(--navy));
  background-size: 400% 100%; animation: shimmer 4s ease-in-out infinite;
}
.benefits-title {
  font-size: 0.9rem; font-weight: 800; color: var(--navy); margin-bottom: 24px;
  padding-bottom: 14px; border-bottom: 1px solid var(--border);
  letter-spacing: 0.15em; text-transform: uppercase;
}
.benefits-list { display: flex; flex-direction: column; gap: 14px; }
.benefit-item {
  padding: 18px 20px; background: var(--sand); border-radius: 12px;
  border-left: 3px solid var(--navy);
  transition: border-color 0.2s, background 0.2s;
}
.benefit-item:hover { background: var(--sand-dark); border-color: var(--accent); }
.benefit-type-badge {
  display: inline-block; background: linear-gradient(135deg, var(--navy), var(--navy-mid));
  color: white; font-size: 0.7rem; padding: 4px 12px; border-radius: 20px;
  margin-bottom: 10px; font-weight: 700;
}
.benefit-description { font-size: 0.88rem; line-height: 1.8; color: #2A3A50; }
.no-benefits { color: var(--text-muted); font-size: 0.9rem; padding: 20px 0; }

.detail-footer {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 24px; padding: 0 4px;
}
.updated-at { font-size: 0.78rem; color: var(--text-muted); }
.btn-back-bottom { font-size: 0.88rem; color: var(--accent); font-weight: 700; }
.btn-back-bottom:hover { color: var(--navy); }

/* ===== トースト ===== */
.toast {
  position: fixed; bottom: 28px; right: 28px; background: var(--navy); color: white;
  padding: 14px 22px; border-radius: 12px; font-size: 0.88rem;
  border: 1px solid rgba(255,255,255,0.1); box-shadow: 0 6px 24px rgba(10,37,64,0.3); z-index: 1000;
}
.toast.hidden { display: none; }

.multi-program-notice {
  background: rgba(10,110,189,0.06); border: 1px solid rgba(10,110,189,0.2);
  border-radius: 10px; padding: 14px 18px; margin-bottom: 20px;
  font-size: 0.88rem; color: var(--navy-mid); line-height: 1.6;
}
.notice-icon { font-size: 1.1rem; margin-right: 6px; }

.program-block { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; margin-bottom: 4px; }
.program-header {
  display: flex; align-items: center; gap: 10px;
  background: var(--sand); padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}
.program-label {
  font-size: 0.75rem; font-weight: 800; color: var(--navy);
  letter-spacing: 0.08em; text-transform: uppercase;
}
.program-block .benefits-list { padding: 12px 16px; }

.program-separator {
  text-align: center; font-size: 0.78rem; font-weight: 700;
  color: var(--text-muted); letter-spacing: 0.12em; text-transform: uppercase;
  margin: 10px 0; display: flex; align-items: center; gap: 12px;
}
.program-separator::before, .program-separator::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

@media (max-width: 768px) {
  .site-header { padding: 0 14px; }
  .header-inner { flex-wrap: wrap; height: auto; padding: 10px 0; gap: 8px; }
  .header-meta { flex-wrap: wrap; gap: 8px; font-size: 0.75rem; }
}
@media (max-width: 640px) {
  .search-main { flex-direction: column; }
  .search-filters { flex-direction: column; }
  .filter-select, .filter-input { width: 100%; }
  .hotel-grid { grid-template-columns: 1fr; }
  .hotel-mixed-list .hotel-card { flex: 0 0 100%; min-width: 0; }
  .hotel-row-right { display: none; }
  .last-update, .hotel-count { display: none; }
  .detail-hotel-name { font-size: 1.5rem; }
  .gallery-wrap { height: 280px; }
  .detail-container { padding: 20px 16px; }
  .detail-header, .benefits-section { padding: 22px 20px; }
  .result-header { flex-wrap: wrap; gap: 12px; }
}

/* ── スマホ最適化（〜480px） ───────────────────── */
@media (max-width: 480px) {
  /* ナビゲーション */
  .nav { padding: 0 16px; gap: 12px; }
  .nav-right { gap: 6px; }
  .nav-logo { font-size: 1.1rem; }
  .nav-search-btn, .nav-line-btn { padding: 8px 12px; font-size: 0.8rem; }

  /* 共通セクション余白 */
  .section { padding: 40px 16px !important; }

  /* ヒーロー */
  .hero-title { font-size: clamp(22px, 6vw, 40px) !important; }
  .hero-subtitle { font-size: 0.95rem !important; }
  .hero-search-card { padding: 18px 16px !important; }
  .hero-search-grid { grid-template-columns: 1fr !important; }
  .hero-search-label { font-size: 11px !important; }

  /* ホテルカード */
  .hotel-mixed-list { gap: 12px; }
  .hotel-mixed-list .hotel-card,
  .hotel-mixed-list .hotel-row { flex: 0 0 100% !important; min-width: 0 !important; }

  /* 特集ホテルグリッド */
  .featured-grid { grid-template-columns: 1fr !important; gap: 16px; }

  /* キャンペーン・イベント */
  .campaign-card, .event-card { width: 100% !important; }

  /* フッター */
  .footer-cols { grid-template-columns: 1fr !important; gap: 28px; }

  /* ホテル詳細ギャラリー */
  .gallery-wrap { height: 200px; }
  .gallery-btn { width: 40px; height: 40px; font-size: 1.2rem; }

  /* タッチターゲット最低44px */
  .btn-logout, .btn-back, .btn-back-bottom,
  .btn-search, .filter-select, .filter-input {
    min-height: 44px;
  }

  /* ログイン */
  .login-container { padding: 32px 18px !important; max-width: 100% !important; }
  .login-logo h1 { font-size: 1.5rem !important; letter-spacing: 0.2em !important; }
  .login-logo .tagline { letter-spacing: 0.3em !important; font-size: 0.65rem !important; }

  /* 利用規約 */
  .terms-container { padding: 0 16px !important; }
}

/* ── タブレット（481px〜900px） ───────────────── */
@media (min-width: 481px) and (max-width: 900px) {
  .featured-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .footer-cols { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ── 大画面PC（1600px〜） ───────────────── */
@media (min-width: 1600px) {
  .section { max-width: 1400px; margin: 0 auto; }
}
