/* ============================================
   KARAKOL HUB — Professional Animations & Effects
   ============================================ */

/* ---- Scroll Reveal Animation ---- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal-left.active {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(50px);
  transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal-right.active {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: all 0.6s cubic-bezier(0.5, 0, 0, 1);
}

.reveal-scale.active {
  opacity: 1;
  transform: scale(1);
}

/* Stagger delays */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }
.stagger-6 { transition-delay: 0.6s; }

/* ---- Parallax Hero ---- */
.parallax-hero {
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

@media (max-width: 768px) {
  .parallax-hero {
    background-attachment: scroll;
  }
}

/* ---- Image Hover Zoom ---- */
.img-zoom {
  overflow: hidden;
}

.img-zoom img {
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.img-zoom:hover img {
  transform: scale(1.08);
}

/* ---- Ken Burns Effect ---- */
@keyframes kenBurns {
  0% { transform: scale(1) translate(0, 0); }
  100% { transform: scale(1.1) translate(-1%, -1%); }
}

.ken-burns {
  animation: kenBurns 20s ease-in-out infinite alternate;
}

/* ---- Shimmer Loading ---- */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.shimmer {
  background: linear-gradient(90deg, #e8e5df 25%, #f0ede8 50%, #e8e5df 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

/* ---- Floating Animation ---- */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.float-animation {
  animation: float 3s ease-in-out infinite;
}

/* ---- Pulse Glow ---- */
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(196, 154, 59, 0.4); }
  50% { box-shadow: 0 0 20px 10px rgba(196, 154, 59, 0.1); }
}

.pulse-glow {
  animation: pulseGlow 2s ease-in-out infinite;
}

/* ---- Text Gradient Animation ---- */
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.text-gradient-animated {
  background: linear-gradient(90deg, #c49a3b, #d4a855, #e8c87a, #c49a3b);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 4s ease infinite;
}

/* ---- Card 3D Tilt ---- */
.tilt-card {
  transform-style: preserve-3d;
  transition: transform 0.3s ease;
}

.tilt-card:hover {
  transform: perspective(1000px) rotateX(2deg) rotateY(-2deg) translateY(-4px);
}

/* ---- Smooth Counter ---- */
@keyframes countUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.counter-animate {
  animation: countUp 0.6s ease-out forwards;
}

/* ---- Blur Reveal ---- */
.blur-reveal {
  filter: blur(10px);
  opacity: 0;
  transition: all 0.8s ease;
}

.blur-reveal.active {
  filter: blur(0);
  opacity: 1;
}

/* ---- Magnetic Button ---- */
.magnetic-btn {
  transition: transform 0.2s ease;
}

/* ---- Glassmorphism ---- */
.glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.glass-dark {
  background: rgba(28, 26, 22, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* ---- Particle Background ---- */
.particles-bg {
  position: relative;
  overflow: hidden;
}

.particles-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(circle at 20% 50%, rgba(196, 154, 59, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(196, 154, 59, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 40% 20%, rgba(255, 255, 255, 0.03) 0%, transparent 50%);
  pointer-events: none;
}

/* ---- Hover Glow Border ---- */
.glow-border {
  position: relative;
  transition: all 0.3s ease;
}

.glow-border::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(196, 154, 59, 0), rgba(196, 154, 59, 0.3), rgba(196, 154, 59, 0));
  -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.3s ease;
}

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

/* ---- Smooth Scrollbar ---- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #1c1a16;
}

::-webkit-scrollbar-thumb {
  background: #4d463b;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #635a4b;
}

/* ---- Loading Skeleton ---- */
.skeleton {
  background: linear-gradient(90deg, #e8e5df 25%, #f0ede8 50%, #e8e5df 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: 8px;
}

/* ---- Image Overlay Gradient ---- */
.img-overlay {
  position: relative;
}

.img-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(28, 26, 22, 0.8) 0%, transparent 50%);
  pointer-events: none;
  border-radius: inherit;
}

/* ---- Text Reveal Animation ---- */
@keyframes textReveal {
  0% { clip-path: inset(0 100% 0 0); }
  100% { clip-path: inset(0 0% 0 0); }
}

.text-reveal {
  animation: textReveal 0.8s ease-out forwards;
}

/* ---- Bounce In ---- */
@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); opacity: 1; }
}

.bounce-in {
  animation: bounceIn 0.6s ease-out forwards;
}

/* ---- Wave Separator ---- */
.wave-separator {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
}

.wave-separator svg {
  position: relative;
  display: block;
  width: calc(100% + 1.3px);
  height: 60px;
}

/* ---- Custom Cursor (optional) ---- */
.custom-cursor {
  cursor: none;
}

/* ---- Hover Lift with Shadow ---- */
.hover-lift {
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hover-lift:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* ---- Section Divider ---- */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, #d1ccc2, transparent);
}

/* ---- Progress Bar Animation ---- */
@keyframes progressFill {
  from { width: 0; }
}

.progress-animate {
  animation: progressFill 1.5s ease-out forwards;
}

/* ---- Rating Stars Glow ---- */
.star-glow {
  filter: drop-shadow(0 0 2px rgba(251, 191, 36, 0.5));
}

/* ---- Smooth Page Transition ---- */
.page-transition {
  animation: fadeInUp 0.5s ease-out;
}

/* ---- Image Lazy Load Blur ---- */
.img-lazy {
  filter: blur(10px);
  transition: filter 0.5s ease;
}

.img-lazy.loaded {
  filter: blur(0);
}

/* ---- Hero Text Shadow ---- */
.hero-text-shadow {
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3), 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* ---- Card Shine Effect ---- */
.card-shine {
  position: relative;
  overflow: hidden;
}

.card-shine::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    to bottom right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0) 40%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0) 60%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(45deg);
  transition: all 0.5s ease;
  opacity: 0;
}

.card-shine:hover::before {
  opacity: 1;
  left: 100%;
  top: 100%;
}

/* ---- Responsive Typography Scale ---- */
@media (max-width: 640px) {
  .hero-title {
    font-size: 2.5rem;
    line-height: 1.1;
  }
}

/* ---- Print Styles ---- */
@media print {
  .no-print { display: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* ---- Preloader Fade ---- */
.preloader-fade {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
