/* ===================================================
 * 大黒屋 甲府買取センター - カスタムCSS
 * style.css（コンパイル済み）の後に読み込む追記用
 * ===================================================
 * タイポグラフィ是正: 14px未満のフォントサイズを使用しない
 * ===================================================
 */

/* ヘッダースクロール時の背景強化 */
.site-header.scrolled {
  background-color: rgba(3,3,1,0.98) !important;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

/* ナビリンクホバー */
.nav-link:hover {
  color: #cd5900 !important;
}

/* フッターリンクホバー */
.footer-nav-link:hover {
  color: #cd5900 !important;
}
.footer-legal-link:hover {
  color: rgba(255,255,255,0.7) !important;
}
.footer-tel-link:hover {
  color: #e06a10 !important;
}
.footer-phone-btn:hover {
  background-color: #b04d00 !important;
}

/* フェードインアニメーション（IntersectionObserver用） */
.fade-in-section {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.fade-in-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ヒーロースライダー */
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.5s ease;
}
.hero-slide.active {
  opacity: 1;
}

/* スライドインジケーター */
.slide-indicator {
  height: 2px;
  width: 32px;
  background-color: rgba(255,255,255,0.25);
  transition: width 0.6s ease, background-color 0.6s ease;
  cursor: pointer;
  border: none;
  padding: 0;
}
.slide-indicator.active {
  width: 48px;
  background-color: #cd5900;
}

/* アコーディオン */
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}
.accordion-content.open {
  max-height: 2000px;
}

/* タイポグラフィ是正: 14px未満禁止 */
/* 注記・キャプション・タグ・フッター著作権表示も14px以上 */
.text-note,
.text-caption,
.text-tag,
.copyright-text {
  font-size: 14px !important;
}

/* ===================================================
 * style.css（Tailwind v4ビルド済み）に定義が無いクラスの補完
 * --spacing:.25rem / sm ブレークポイント 640px に合わせている
 * =================================================== */

.mt-12 { margin-top: 3rem; }
.mt-14 { margin-top: 3.5rem; }
.max-w-\[860px\] { max-width: 860px; }
.text-\[80px\] { font-size: 80px; }

@media (min-width: 640px) {
  .sm\:w-12    { width: 3rem; }
  .sm\:h-12    { height: 3rem; }
  .sm\:left-6  { left: 1.5rem; }
  .sm\:right-6 { right: 1.5rem; }
}

.group-hover\:scale-\[1\.08\]:is(:where(.group):hover *) {
  --tw-scale-x: 108%;
  --tw-scale-y: 108%;
  --tw-scale-z: 108%;
  scale: var(--tw-scale-x) var(--tw-scale-y);
}

/* 通貨カード（トップ・ダーク背景） */
.currency-card:hover {
  border-color: #cd5900 !important;
  background-color: #202020 !important;
}

/* 通貨カード（外貨両替ページ・ライト背景） */
.currency-card-light:hover {
  border-color: #cd5900 !important;
  background-color: rgba(205, 89, 0, 0.06) !important;
}

/* 買取方法カード（トップ） */
.purchase-method-card:hover {
  border-color: #cd5900 !important;
  background-color: rgba(255, 255, 255, 0.08) !important;
}


/* ===================================================
 * 買取事例ページ: カテゴリ絞り込みボタン
 * =================================================== */

.record-filter {
  padding: 8px 20px;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 14px;
  letter-spacing: 0.08em;
  color: #c9a96e;
  background-color: transparent;
  border: 1px solid rgba(201, 169, 110, 0.35);
  cursor: pointer;
  transition: all 0.3s ease;
  line-height: 1.5;
}

.record-filter:hover {
  border-color: #cd5900;
  color: #ffffff;
}

.record-filter.is-active {
  background-color: #cd5900;
  border-color: #cd5900;
  color: #ffffff;
  font-weight: 700;
}

/* ===================================================
 * 買取事例ページ: すべての事例を見るボタン
 * =================================================== */

.record-toggle {
  display: inline-block;
  padding: 18px 64px;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #ffffff;
  background-color: #cd5900;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
  line-height: 1.5;
}

.record-toggle:hover {
  background-color: #b34d00;
}

/* 買取事例カード（JSでの表示切替のフック。見た目は既存クラスで付いている） */
.record-card {
  display: block;
}

/* ===================================================
 * microCMS 画面プレビュー用ステータスバー（画面下部固定）
 * =================================================== */

#preview-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background-color: #cd5900;
  color: #ffffff;
  font-family: 'Noto Sans JP', sans-serif;
  line-height: 1.6;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.45);
}

#preview-bar .preview-bar-inner {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 16px;
  min-width: 0;
}

#preview-bar .preview-bar-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #ffffff;
  flex-shrink: 0;
  animation: preview-bar-blink 1.6s ease-in-out infinite;
}

@keyframes preview-bar-blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.25; }
}

#preview-bar .preview-bar-main {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

#preview-bar .preview-bar-meta {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  border-left: 1px solid rgba(255, 255, 255, 0.4);
  padding-left: 16px;
  white-space: nowrap;
}

#preview-bar-close {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: #ffffff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

#preview-bar-close:hover {
  background-color: rgba(255, 255, 255, 0.18);
}

/* バーがフッター末尾のコンテンツを隠さないよう余白を確保する */
body.has-preview-bar {
  padding-bottom: 72px;
}

@media (max-width: 640px) {
  #preview-bar {
    padding: 10px 12px;
    gap: 8px;
  }
  #preview-bar .preview-bar-meta {
    font-size: 14px;
  }
  #preview-bar .preview-bar-meta {
    border-left: none;
    padding-left: 0;
  }
  body.has-preview-bar {
    padding-bottom: 104px;
  }
}

#preview-bar .preview-bar-status {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  background-color: rgba(0, 0, 0, 0.28);
  padding: 3px 12px;
  white-space: nowrap;
}

/* ===================================================
 * 2026.09 スマホ・タブレット表示崩れ修正
 * 追加したフック用クラスは各PHPのHTMLに付与済み
 * =================================================== */

/* ---------------------------------------------------
 * トップ: ファーストビュー
 * 中央ブロックは縦積みflexの子なので、中身（NEWS枠）の
 * 最大幅まで広がり、画面の外へはみ出していた。
 * 幅を親いっぱいに固定して、はみ出しを止める。
 * --------------------------------------------------- */
.hero-copy {
  width: 100%;
  min-width: 0;
}

/* キャッチコピーのスマホ用改行（640px以上では無効） */
@media (min-width: 640px) {
  .hero-br-sp { display: none; }
}

/* NEWS枠: 見出しを折り返せるようにして画面幅に収める */
.hero-news {
  max-width: 100%;
}
.hero-news-title {
  white-space: normal;
}

@media (max-width: 639.98px) {
  .hero-news {
    display: flex;
    width: 100%;
  }
  .hero-news-body {
    flex-wrap: wrap;
    gap: 2px 10px;
    padding-left: 14px;
    padding-right: 14px;
    min-width: 0;
  }
  .hero-news-title {
    flex: 1 1 100%;
    line-height: 1.7;
  }
}

/* ---------------------------------------------------
 * トップ: 選ばれる3つの理由
 * 白カードが 530x480px 固定だったため、画像の高さ
 * （画面幅 ÷ 3.2）に収まらず上下左右が切れていた。
 * --------------------------------------------------- */

/* PC: 画像の高さに追従させる（1536px未満でも切れないように） */
@media (min-width: 1024px) {
  .reason-card {
    width: min(530px, 40vw) !important;
    height: min(480px, 88%) !important;
    min-height: fit-content;
    aspect-ratio: auto !important;
    padding: clamp(14px, 1.6vw, 32px) !important;
  }
  .reason-script { font-size: clamp(30px, 3.4vw, 60px) !important; }
  .reason-label  { font-size: clamp(14px, 1.15vw, 18px) !important; }
  .reason-title  { font-size: clamp(20px, 1.95vw, 30px) !important; }
  .reason-lead   { font-size: clamp(14px, 1.15vw, 18px) !important; }
  .reason-desc   { font-size: clamp(14px, 1.05vw, 16px) !important; }
}

/* スマホ・タブレット: 画像の上に重ねず、画像→カードの縦積みにする */
@media (max-width: 1023.98px) {
  .reason-media {
    aspect-ratio: auto !important;
  }
  .reason-img {
    position: relative !important;
    inset: auto !important;
    height: 200px !important;
    width: 100% !important;
  }
  .reason-overlay {
    position: static !important;
    display: block !important;
    height: auto !important;
    padding: 0 16px !important;
    margin-top: -40px;
  }
  .reason-card {
    width: auto !important;
    height: auto !important;
    aspect-ratio: auto !important;
    padding: 24px 20px !important;
  }
  .reason-script { font-size: 34px !important; }
  .reason-label  { font-size: 14px !important; }
  .reason-title  { font-size: 22px !important; }
  .reason-lead   { font-size: 16px !important; }
  .reason-desc   { font-size: 14px !important; }
}

@media (max-width: 480px) {
  .reason-img { height: 160px !important; }
  .reason-overlay { padding: 0 12px !important; }
  .reason-card { padding: 20px 16px !important; }
  .reason-script { font-size: 28px !important; }
}

/* ---------------------------------------------------
 * 買取対象アイテム: その他カテゴリのカード
 * 説明文を正方形の画像の上に絶対配置していたため、
 * 文章が長いものは上側が切れていた。
 * 1023px以下は画像の下に文章を置く（2カラム固定）。
 * --------------------------------------------------- */
@media (max-width: 1023.98px) {
  .item-other-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .item-other-grad {
    display: none !important;
  }
  .item-other-body {
    position: static !important;
    padding: 14px 14px 16px !important;
    background: rgba(201, 169, 110, 0.05);
  }
}

/* ---------------------------------------------------
 * 店舗案内: 店舗情報テーブル
 * 項目名が長くなったため、スマホでは見出し列を狭める
 * --------------------------------------------------- */
@media (max-width: 639.98px) {
  .store-row-label {
    width: 108px !important;
    min-width: 108px !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  .store-row-value {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}
