/* 五月女社会保険労務管理事務所 - 共通エフェクト */
/* 全ページで使える魅力的なエフェクト集 */

/* ============================================
   背景パターンとエフェクト
   ============================================ */

/* アニメーショングラデーション背景 */
.animated-gradient-bg {
  background: linear-gradient(
    135deg,
    var(--bg-gradient-start),
    var(--bg-gradient-mid),
    var(--bg-gradient-end),
    var(--bg-gradient-mid),
    var(--bg-gradient-start)
  );
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* 浮遊する装飾要素 */
.floating-shapes {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.floating-shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.1;
  animation: float 20s infinite ease-in-out;
}

.floating-shape-1 {
  width: 300px;
  height: 300px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.floating-shape-2 {
  width: 200px;
  height: 200px;
  background: linear-gradient(135deg, var(--secondary-color), var(--secondary-light));
  top: 60%;
  right: 15%;
  animation-delay: 5s;
}

.floating-shape-3 {
  width: 150px;
  height: 150px;
  background: linear-gradient(135deg, var(--accent-color), var(--accent-light));
  bottom: 20%;
  left: 30%;
  animation-delay: 10s;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) translateX(0) scale(1);
  }
  25% {
    transform: translateY(-30px) translateX(20px) scale(1.05);
  }
  50% {
    transform: translateY(-60px) translateX(-20px) scale(0.95);
  }
  75% {
    transform: translateY(-30px) translateX(30px) scale(1.02);
  }
}

/* パーティクル効果 */
.particles {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--primary-light);
  border-radius: 50%;
  opacity: 0.3;
  animation: particleFloat 15s infinite linear;
}

@keyframes particleFloat {
  0% {
    transform: translateY(0) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: 0.3;
  }
  90% {
    opacity: 0.3;
  }
  100% {
    transform: translateY(-100vh) translateX(50px);
    opacity: 0;
  }
}

/* ============================================
   カードエフェクト
   ============================================ */

/* 3Dティルトエフェクト（準備） */
.card-3d {
  transform-style: preserve-3d;
  transition: transform 0.3s ease;
}

.card-3d:hover {
  transform: perspective(1000px) rotateX(2deg) rotateY(2deg);
}

/* グローイングボーダー */
.glowing-border {
  position: relative;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.glowing-border::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(
    45deg,
    var(--primary-color),
    var(--secondary-color),
    var(--accent-color),
    var(--primary-light)
  );
  background-size: 300% 300%;
  border-radius: inherit;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
  animation: borderGlow 3s linear infinite;
}

.glowing-border:hover::before {
  opacity: 1;
}

@keyframes borderGlow {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* カードシャイン効果 */
.card-shine {
  position: relative;
  overflow: hidden;
}

.card-shine::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(255, 255, 255, 0.3) 50%,
    transparent 70%
  );
  transform: translateX(-100%) translateY(-100%);
  transition: transform 0.6s ease;
}

.card-shine:hover::after {
  transform: translateX(100%) translateY(100%);
}

/* ============================================
   ボタンエフェクト
   ============================================ */

/* パルスグロー */
.btn-pulse {
  animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(201, 169, 123, 0.4);
  }
  50% {
    box-shadow: 0 0 40px rgba(201, 169, 123, 0.7);
  }
}

/* シェイクエフェクト */
.shake-on-hover:hover {
  animation: shake 0.5s ease;
}

@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px) rotate(-2deg);
  }
  75% {
    transform: translateX(5px) rotate(2deg);
  }
}

/* バウンスイン */
.bounce-in {
  animation: bounceIn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    transform: scale(1);
  }
}

/* ============================================
   テキストエフェクト
   ============================================ */

/* ベージュテキスト */
.gradient-text-animated {
  color: var(--primary-dark);
  font-weight: 700;
}

/* タイピングエフェクト */
.typing-effect {
  overflow: hidden;
  border-right: 3px solid var(--primary-color);
  white-space: nowrap;
  animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes blink-caret {
  from, to {
    border-color: transparent;
  }
  50% {
    border-color: var(--primary-color);
  }
}

/* ============================================
   ホバーエフェクト集
   ============================================ */

/* リフトアップ */
.lift-on-hover {
  transition: var(--transition-normal);
}

.lift-on-hover:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

/* 拡大 */
.scale-on-hover {
  transition: var(--transition-normal);
}

.scale-on-hover:hover {
  transform: scale(1.05);
}

/* 回転 */
.rotate-on-hover {
  transition: var(--transition-normal);
}

.rotate-on-hover:hover {
  transform: rotate(5deg);
}

/* グロー */
.glow-on-hover {
  transition: var(--transition-normal);
}

.glow-on-hover:hover {
  box-shadow: 0 0 30px rgba(201, 169, 123, 0.6);
}

/* ============================================
   スクロールアニメーション
   ============================================ */

/* フェードアップ */
.fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* フェードレフト */
.fade-left {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-left.visible {
  opacity: 1;
  transform: translateX(0);
}

/* フェードライト */
.fade-right {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* スケールイン */
.scale-up {
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.scale-up.visible {
  opacity: 1;
  transform: scale(1);
}

/* ============================================
   ローディングエフェクト
   ============================================ */

/* スケルトンローダー */
.skeleton {
  background: linear-gradient(
    90deg,
    rgba(201, 169, 123, 0.1) 25%,
    rgba(201, 169, 123, 0.2) 50%,
    rgba(201, 169, 123, 0.1) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* スピナー */
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(201, 169, 123, 0.2);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ============================================
   バッジとラベル
   ============================================ */

/* パルスバッジ */
.pulse-badge {
  position: relative;
  display: inline-block;
}

.pulse-badge::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 10px;
  height: 10px;
  background: var(--success-color);
  border-radius: 50%;
  animation: pulse-ring 1.5s infinite;
}

@keyframes pulse-ring {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(2);
    opacity: 0;
  }
}

/* リボン */
.ribbon {
  position: absolute;
  top: 20px;
  right: -5px;
  background: linear-gradient(135deg, var(--secondary-color), var(--secondary-dark));
  color: var(--text-white);
  padding: 0.5rem 1.5rem;
  font-weight: 700;
  font-size: 0.875rem;
  box-shadow: 0 4px 12px rgba(255, 107, 157, 0.4);
  z-index: 10;
}

.ribbon::before {
  content: '';
  position: absolute;
  bottom: -10px;
  right: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 10px 10px 0 0;
  border-color: var(--secondary-dark) transparent transparent transparent;
}

/* ============================================
   トランジションユーティリティ
   ============================================ */

.transition-fast {
  transition: var(--transition-fast);
}

.transition-normal {
  transition: var(--transition-normal);
}

.transition-slow {
  transition: var(--transition-slow);
}

.transition-bounce {
  transition: var(--transition-bounce);
}

/* ============================================
   グラスモーフィズム
   ============================================ */

.glass-morphism {
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.glass-morphism-strong {
  background: var(--card-bg);
  backdrop-filter: blur(25px) saturate(200%);
  -webkit-backdrop-filter: blur(25px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* ============================================
   キラキラエフェクト
   ============================================ */

/* キラキラ装飾 */
.sparkles {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: 2;
}

.sparkle {
  position: absolute;
  width: 8px;
  height: 8px;
  background: radial-gradient(circle, #E8DDD0, transparent);
  opacity: 0;
  animation: sparkle 3s infinite ease-in-out;
}

@keyframes sparkle {
  0%, 100% {
    opacity: 0;
    transform: scale(0) rotate(0deg);
  }
  50% {
    opacity: 1;
    transform: scale(1) rotate(180deg);
  }
}

/* ホバー時の光輪エフェクト */
.glow-ring {
  position: relative;
}

.glow-ring::after {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: inherit;
  background: linear-gradient(
    45deg,
    var(--primary-color),
    var(--secondary-color),
    var(--accent-color),
    var(--primary-color)
  );
  opacity: 0;
  z-index: -1;
  filter: blur(15px);
  transition: opacity 0.3s ease;
  animation: rotateGlow 3s linear infinite;
}

.glow-ring:hover::after {
  opacity: 0.7;
}

@keyframes rotateGlow {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* ふわふわ浮遊エフェクト */
.float-bounce {
  animation: floatBounce 3s ease-in-out infinite;
}

@keyframes floatBounce {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  25% {
    transform: translateY(-10px) rotate(1deg);
  }
  50% {
    transform: translateY(-20px) rotate(-1deg);
  }
  75% {
    transform: translateY(-10px) rotate(0.5deg);
  }
}

/* カードのホログラム効果 */
.holographic-card {
  position: relative;
  overflow: hidden;
}

.holographic-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    115deg,
    transparent 0%,
    rgba(255, 255, 255, 0) 40%,
    rgba(255, 255, 255, 0.8) 45%,
    rgba(255, 255, 255, 0.9) 50%,
    rgba(255, 255, 255, 0) 55%,
    transparent 100%
  );
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.holographic-card:hover::before {
  transform: translateX(100%);
}

/* ハートビートエフェクト */
.heartbeat {
  animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
  0%, 100% {
    transform: scale(1);
  }
  14%, 28% {
    transform: scale(1.1);
  }
  21%, 35% {
    transform: scale(1);
  }
}

/* ============================================
   レスポンシブ
   ============================================ */

@media (max-width: 768px) {
  .floating-shape {
    display: none;
  }

  .particles {
    opacity: 0.5;
  }
}

@media (max-width: 768px) {
  .sparkles,
  .glow-ring::after {
    display: none;
  }
}

/* ============================================
   追加のユーティリティクラス
   ============================================ */

/* テキストシャイン効果 */
.text-shine {
  background: linear-gradient(
    120deg,
    var(--primary-color),
    var(--secondary-color),
    var(--accent-color),
    var(--primary-color)
  );
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: textShine 3s linear infinite;
}

@keyframes textShine {
  0% {
    background-position: 0% center;
  }
  100% {
    background-position: 200% center;
  }
}

/* マジカルボーダー */
.magical-border {
  position: relative;
  border: 2px solid transparent;
  background: linear-gradient(var(--card-bg), var(--card-bg)) padding-box,
              linear-gradient(135deg, var(--primary-color), var(--secondary-color), var(--accent-color)) border-box;
}

.magical-border::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color), var(--accent-color));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.magical-border:hover::before {
  opacity: 1;
}

/* スムーズスクロール動作 */
.smooth-scroll {
  scroll-behavior: smooth;
}

/* テキストグラデーション（静的） */
.text-gradient-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-secondary {
  background: linear-gradient(135deg, var(--secondary-color), var(--secondary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* インタラクティブなアイコン */
.interactive-icon {
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.interactive-icon:hover {
  transform: scale(1.2) rotate(10deg);
}

/* ホバー時の明るさ */
.hover-brighten {
  transition: filter 0.3s ease;
}

.hover-brighten:hover {
  filter: brightness(1.15);
}

/* スケールホバー */
.hover-scale {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

/* パルスグロー */
.pulse-glow {
  animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 10px rgba(201, 169, 123, 0.3);
  }
  50% {
    box-shadow: 0 0 25px rgba(201, 169, 123, 0.6);
  }
}

/* リズミカルバウンス */
.rhythmic-bounce {
  animation: rhythmicBounce 2s ease-in-out infinite;
}

@keyframes rhythmicBounce {
  0%, 100% {
    transform: translateY(0);
  }
  25% {
    transform: translateY(-8px);
  }
  50% {
    transform: translateY(0);
  }
  75% {
    transform: translateY(-4px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .animated-gradient-bg,
  .floating-shape,
  .particle,
  .gradient-text-animated,
  .btn-pulse,
  .sparkle,
  .float-bounce,
  .glow-ring,
  .heartbeat,
  .text-shine,
  .pulse-glow,
  .rhythmic-bounce,
  .interactive-icon:hover {
    animation: none !important;
  }

  .holographic-card::before {
    animation: none;
  }

  .hover-scale:hover,
  .interactive-icon:hover {
    transform: none;
  }
}
