/* ============================================================
   HoteliersClub v2 — Animations & Motion
   ============================================================ */

/* ── Keyframes ─────────────────────────────────────────── */
@keyframes fadeIn      { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp    { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes fadeInDown  { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }
@keyframes fadeInLeft  { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }
@keyframes fadeInRight { from { opacity: 0; transform: translateX(24px);  } to { opacity: 1; transform: none; } }
@keyframes scaleIn     { from { opacity: 0; transform: scale(0.94); } to { opacity: 1; transform: none; } }
@keyframes slideUp     { from { transform: translateY(100%); } to { transform: none; } }
@keyframes spin        { to { transform: rotate(360deg); } }
@keyframes pulse       { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
@keyframes float       { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
@keyframes countUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@keyframes ringFill {
  from { background: conic-gradient(var(--hc-primary) 0%, var(--hc-bg-alt) 0%); }
  to   { background: conic-gradient(var(--hc-primary) var(--pct, 0%), var(--hc-bg-alt) 0%); }
}
@keyframes accentPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(232,144,10,0); }
  50%       { box-shadow: 0 0 0 8px rgba(232,144,10,0.15); }
}

/* ── Animation Classes ─────────────────────────────────── */
.animate-fade-in    { animation: fadeIn      0.4s var(--ease) both; }
.animate-fade-up    { animation: fadeInUp    0.5s var(--ease) both; }
.animate-fade-down  { animation: fadeInDown  0.4s var(--ease) both; }
.animate-fade-left  { animation: fadeInLeft  0.5s var(--ease) both; }
.animate-scale-in   { animation: scaleIn     0.3s var(--ease) both; }
.animate-pulse      { animation: pulse 2s ease-in-out infinite; }
.animate-float      { animation: float 4s ease-in-out infinite; }
.animate-spin       { animation: spin 0.8s linear infinite; }

/* Staggered delays for list items */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }

/* ── Skeleton Loading ──────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg,
    var(--hc-bg-alt) 0%,
    #e8e4db 40%,
    var(--hc-bg-alt) 80%
  );
  background-size: 800px 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: var(--radius-md);
}
.skeleton-text { height: 14px; margin-bottom: 8px; }
.skeleton-text.lg { height: 20px; }
.skeleton-text.sm { height: 12px; width: 60%; }
.skeleton-circle { border-radius: 50%; }
.skeleton-card {
  background: var(--hc-surface);
  border: 1px solid var(--hc-border-light);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.skeleton-card .skeleton-text:first-child { width: 70%; }

/* ── Hover Effects ─────────────────────────────────────── */
.hover-lift { transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.hover-lift:hover { transform: translateY(-4px); box-shadow: var(--hc-shadow-lg); }

.hover-scale { transition: transform var(--dur) var(--ease); }
.hover-scale:hover { transform: scale(1.03); }

.hover-glow:hover { box-shadow: 0 0 0 4px rgba(26,107,74,0.15); }

.hover-accent:hover { box-shadow: 0 0 0 4px rgba(232,144,10,0.15); animation: accentPulse 1s ease; }

/* ── Scroll Reveal ─────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal.visible { opacity: 1; transform: none; }
.reveal-left    { opacity: 0; transform: translateX(-28px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.reveal-left.visible { opacity: 1; transform: none; }
.reveal-right   { opacity: 0; transform: translateX(28px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.reveal-right.visible { opacity: 1; transform: none; }

/* ── Transition Utilities ──────────────────────────────── */
.transition      { transition: all var(--dur) var(--ease); }
.transition-fast { transition: all var(--dur-fast) var(--ease); }
.transition-slow { transition: all var(--dur-slow) var(--ease); }
.transition-colors { transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease), border-color var(--dur) var(--ease); }

/* ── Loading Spinner ───────────────────────────────────── */
.spinner {
  width: 24px; height: 24px; border-radius: 50%;
  border: 3px solid var(--hc-border);
  border-top-color: var(--hc-primary);
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
.spinner-sm { width: 16px; height: 16px; border-width: 2px; }
.spinner-lg { width: 40px; height: 40px; border-width: 4px; }
.spinner-white { border-color: rgba(255,255,255,0.3); border-top-color: #fff; }

/* ── Page transition ───────────────────────────────────── */
.page-enter { animation: fadeIn 0.3s var(--ease) both; }

/* ── Gradient text ─────────────────────────────────────── */
.gradient-text {
  background: linear-gradient(135deg, var(--hc-primary) 0%, var(--hc-primary-light) 50%, var(--hc-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.gradient-text-saffron {
  background: linear-gradient(135deg, var(--hc-accent) 0%, var(--hc-accent-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Ripple effect ─────────────────────────────────────── */
.ripple { overflow: hidden; position: relative; }
.ripple::after {
  content: ''; position: absolute;
  top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0);
  width: 200%; padding-bottom: 200%;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  transition: transform 0.4s var(--ease), opacity 0.4s var(--ease);
  opacity: 0;
}
.ripple:active::after { transform: translate(-50%, -50%) scale(1); opacity: 1; transition-duration: 0s; }

/* ── Reduce motion ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
