/* ============================================
   カスタムCSS - ぺぷしさんの名レシピ集
   ============================================ */

/* スムーススクロール */
html {
  scroll-behavior: smooth;
}

/* ナビゲーションのスクロール時トランジション */
nav {
  transition: all 0.3s ease-in-out;
}

nav.scrolled {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* レシピカードのホバーエフェクト */
.recipe-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.recipe-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.recipe-card img {
  transition: transform 0.3s ease;
}

.recipe-card:hover img {
  transform: scale(1.05);
}

/* メンターカードのホバーエフェクト */
.mentor-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.mentor-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 15px 20px -5px rgba(0, 0, 0, 0.1);
}

/* モーダルアニメーション */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.75);
  z-index: 9999;
  animation: fadeIn 0.3s ease-in-out;
}

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  animation: slideUp 0.3s ease-out;
  max-height: 90vh;
  overflow-y: auto;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* スクロールバーのスタイリング（Webkit） */
.modal-content::-webkit-scrollbar {
  width: 8px;
}

.modal-content::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
  background: #D97706;
  border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
  background: #92400E;
}

/* フィルターボタンのアクティブ状態 */
.filter-btn {
  transition: all 0.3s ease;
}

.filter-btn.active {
  background-color: #D97706;
  color: white;
  box-shadow: 0 4px 6px -1px rgba(217, 119, 6, 0.3);
}

/* Hero背景のオーバーレイ */
.hero-overlay {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.5) 0%, rgba(217, 119, 6, 0.3) 100%);
}

/* ロード時のフェードイン（画像用） */
img {
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

img.loaded {
  opacity: 1;
}

/* バッジスタイル */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
}

/* タブのアクティブ状態 */
.tab-button {
  transition: all 0.3s ease;
  border-bottom: 3px solid transparent;
}

.tab-button.active {
  border-bottom-color: #D97706;
  color: #D97706;
  font-weight: 600;
}

/* 食材カードのホバー */
.ingredient-item {
  transition: all 0.3s ease;
}

.ingredient-item:hover {
  background-color: #FEF3C7;
  transform: scale(1.05);
}

/* トップに戻るボタン */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 3rem;
  height: 3rem;
  background-color: #D97706;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0;
  visibility: hidden;
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: #92400E;
  transform: translateY(-4px);
  box-shadow: 0 6px 8px -1px rgba(0, 0, 0, 0.15);
}

/* モバイルメニューのトランジション */
.mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-in-out;
}

.mobile-menu.active {
  max-height: 500px;
}
