/* Café Lumière - カスタムアニメーション */

/* スクロールバーのスタイリング（Webkit系ブラウザ） */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #006400;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #004d00;
}

/* ダークモード時のスクロールバー */
.dark ::-webkit-scrollbar-track {
  background: #1a1a1a;
}

.dark ::-webkit-scrollbar-thumb {
  background: #00a000;
}

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

/* ページロード時のフェードイン */
body {
  opacity: 0;
  animation: fadeIn 0.5s ease-in forwards;
}

body.loaded {
  opacity: 1;
}

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

/* ヘッダーのスクロール時の影 */
header {
  transition: all 0.3s ease-in-out;
}

header.header-scrolled {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* ヒーローセクションのアニメーション */
.hero-content {
  opacity: 0;
  transform: translateY(30px);
  transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-content.hero-animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* スクロールアニメーション用の基本スタイル */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-on-scroll.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* 段階的なアニメーション（カード等） */
.stagger-item {
  opacity: 0;
  transform: translateY(30px) scale(0.95);
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.stagger-item.animate-in {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ホバーエフェクト - カード */
.hover-lift {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift: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);
}

/* ホバーエフェクト - 画像ズーム */
.hover-zoom {
  overflow: hidden;
  position: relative;
}

.hover-zoom::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    180deg,
    rgba(0, 100, 0, 0) 0%,
    rgba(0, 100, 0, 0.3) 100%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
  pointer-events: none;
}

.hover-zoom:hover::before {
  opacity: 1;
}

.hover-zoom img,
.hover-zoom [style*="background-image"] {
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-zoom:hover img,
.hover-zoom:hover [style*="background-image"] {
  transform: scale(1.1);
}

/* ボタンのホバーエフェクト */
button,
.button-hover {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

button::before,
.button-hover::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

button:hover::before,
.button-hover:hover::before {
  width: 300px;
  height: 300px;
}

button:active,
.button-hover:active {
  transform: scale(0.95);
}

/* パルスアニメーション（固定予約ボタン用） */
@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(0, 100, 0, 0.7);
  }
  50% {
    box-shadow: 0 0 0 15px rgba(0, 100, 0, 0);
  }
}

.pulse-once {
  animation: pulse 1s cubic-bezier(0.4, 0, 0.6, 1);
}

/* 常時パルス（注意を引く要素用） */
@keyframes pulse-continuous {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.9;
  }
}

.animate-pulse-slow {
  animation: pulse-continuous 3s ease-in-out infinite;
}

/* フェードインバリエーション */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* セクションタイトルのアンダーラインアニメーション */
.title-underline {
  position: relative;
  display: inline-block;
}

.title-underline::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  width: 0;
  height: 2px;
  background: #8B4513;
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  transform: translateX(-50%);
}

.title-underline.animate-in::after {
  width: 80px;
}

/* ギャラリー画像の遅延読み込みエフェクト */
.lazy-load {
  opacity: 0;
  transition: opacity 0.5s ease;
}

.lazy-load.loaded {
  opacity: 1;
}

/* テキストのグラデーションアニメーション */
@keyframes gradient-shift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.text-gradient-animate {
  background: linear-gradient(
    90deg,
    #006400,
    #00a000,
    #006400
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 3s ease infinite;
}

/* バッジのキラキラエフェクト */
@keyframes shimmer {
  0% {
    background-position: -200px 0;
  }
  100% {
    background-position: calc(200px + 100%) 0;
  }
}

.badge-shimmer {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  background-size: 200px 100%;
  animation: shimmer 2s infinite;
}

/* スケルトンローディング（将来の拡張用） */
@keyframes skeleton-loading {
  0% {
    background-position: -200px 0;
  }
  100% {
    background-position: calc(200px + 100%) 0;
  }
}

.skeleton {
  background: linear-gradient(
    90deg,
    #f0f0f0 0%,
    #e0e0e0 50%,
    #f0f0f0 100%
  );
  background-size: 200px 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
}

/* メニューフィルターのアニメーション */
.menu-item {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.menu-item[style*="display: none"] {
  pointer-events: none;
}

/* カテゴリタブのアクティブ状態 */
.menu-category-link {
  position: relative;
  transition: all 0.3s ease;
}

.menu-category-link::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  right: 0;
  height: 3px;
  background: currentColor;
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.menu-category-link.border-b-primary::after {
  transform: scaleX(1);
}

/* レスポンシブ調整 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* タブレット以下でのアニメーション調整 */
@media (max-width: 768px) {
  .animate-on-scroll {
    transform: translateY(20px);
  }

  .hover-lift:hover {
    transform: translateY(-4px);
  }
}
