/* =============================================
   RAINTREE GROUP - ANIMATIONS STYLESHEET
   ============================================= */

/* =============================================
   KEYFRAME ANIMATIONS
   ============================================= */

/* Fade Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@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); }
}

/* Zoom Animations */
@keyframes zoomIn {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes zoomInUp {
  from { opacity: 0; transform: scale(0.8) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Slide Animations */
@keyframes slideInLeft {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

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

/* Pulse */
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

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

/* Typing cursor */
@keyframes blink {
  0%, 100% { border-color: transparent; }
  50% { border-color: currentColor; }
}

/* Ripple */
@keyframes ripple {
  to { transform: scale(4); opacity: 0; }
}

/* Bounce */
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-20px); }
  60% { transform: translateY(-10px); }
}

/* Rotate */
@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Counter */
@keyframes countUp {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Wave */
@keyframes wave {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(1.5); }
}

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

/* =============================================
   ANIMATION UTILITY CLASSES
   ============================================= */

.animate-fadeIn { animation: fadeIn 0.6s ease both; }
.animate-fadeInUp { animation: fadeInUp 0.7s ease both; }
.animate-fadeInDown { animation: fadeInDown 0.7s ease both; }
.animate-fadeInLeft { animation: fadeInLeft 0.7s ease both; }
.animate-fadeInRight { animation: fadeInRight 0.7s ease both; }
.animate-zoomIn { animation: zoomIn 0.6s ease both; }
.animate-float { animation: float 3s ease-in-out infinite; }
.animate-pulse { animation: pulse 2s ease infinite; }
.animate-bounce { animation: bounce 1s ease; }

/* Delay classes */
.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; }
.delay-600 { animation-delay: 0.6s; }
.delay-700 { animation-delay: 0.7s; }
.delay-800 { animation-delay: 0.8s; }
.delay-1000 { animation-delay: 1s; }

/* =============================================
   HERO SLIDER
   ============================================= */
.hero-slider {
  position: relative;
  width: 100%;
  height: 100%;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.5s ease;
  background-attachment: fixed;
}

.hero-slide.active {
  opacity: 1;
}

.hero-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(10,25,60,0.82) 0%, rgba(26,58,107,0.55) 50%, rgba(0,0,0,0.45) 100%);
}

.slider-dots {
  position: absolute;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 3;
}

.slider-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: all 0.3s ease;
}

.slider-dot.active {
  background: var(--gold-light);
  width: 30px;
  border-radius: 5px;
}

.slider-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.3);
  color: white;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.slider-nav:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.slider-prev { left: 25px; }
.slider-next { right: 25px; }

/* =============================================
   ROTATING TEXT
   ============================================= */
.rotating-text {
  display: inline-block;
  overflow: hidden;
  position: relative;
  height: 1.3em;
  vertical-align: bottom;
}

.rotating-text span {
  display: block;
  color: var(--gold-light);
  animation: rotateText 8s infinite;
  position: relative;
}

@keyframes rotateText {
  0%, 22% { transform: translateY(0); opacity: 1; }
  25%, 47% { transform: translateY(-100%); opacity: 1; }
  50%, 72% { transform: translateY(-200%); opacity: 1; }
  75%, 97% { transform: translateY(-300%); opacity: 1; }
  100% { transform: translateY(-400%); opacity: 0; }
}

/* =============================================
   PARTICLES / DECORATIVE ELEMENTS
   ============================================= */
.particles-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.particle {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  animation: particleFloat linear infinite;
}

@keyframes particleFloat {
  0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(-100px) rotate(360deg); opacity: 0; }
}

.decoration-circle {
  position: absolute;
  border-radius: 50%;
  opacity: 0.05;
  pointer-events: none;
}

/* =============================================
   COUNTERS
   ============================================= */
.counter-number {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 700;
  color: var(--gold-light);
  line-height: 1;
}

/* =============================================
   IMAGE REVEAL
   ============================================= */
.img-reveal {
  overflow: hidden;
}

.img-reveal img {
  transform: scale(1.15);
  transition: transform 1.2s ease;
}

.img-reveal.revealed img {
  transform: scale(1);
}

/* =============================================
   PROGRESS BARS
   ============================================= */
.progress-bar-wrap {
  margin-bottom: 16px;
}

.progress-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 0.85rem;
  font-weight: 500;
}

.progress-track {
  height: 6px;
  background: var(--light-gray);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--primary), var(--accent));
  width: 0;
  transition: width 1.5s ease;
}

/* =============================================
   STICKY HEADER EFFECTS
   ============================================= */
.navbar {
  transition: all 0.4s ease;
}

.navbar.scrolled {
  height: 65px;
}

/* =============================================
   HOVER CARD EFFECTS
   ============================================= */
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.hover-scale {
  transition: transform 0.3s ease;
}

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

/* =============================================
   GRADIENT ANIMATIONS
   ============================================= */
.animated-gradient {
  background: linear-gradient(270deg, var(--primary-dark), var(--primary), var(--primary-light), var(--accent));
  background-size: 400% 400%;
  animation: gradientShift 8s ease infinite;
}

/* =============================================
   SKELETON LOADING
   ============================================= */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

/* =============================================
   NOTIFICATION TOAST
   ============================================= */
.toast-container {
  position: fixed;
  bottom: 100px;
  right: 25px;
  z-index: 9998;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--primary-dark);
  color: white;
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-lg);
  transform: translateX(120%);
  transition: transform 0.4s ease;
  min-width: 280px;
}

.toast.show {
  transform: translateX(0);
}

.toast i {
  color: var(--gold-light);
  font-size: 1rem;
}

.toast-success { border-left: 4px solid #22c55e; }
.toast-error { border-left: 4px solid var(--accent); }
.toast-info { border-left: 4px solid var(--gold); }

/* =============================================
   SCROLL REVEAL SETUP
   ============================================= */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* =============================================
   CAROUSEL
   ============================================= */
.swiper-slide { height: auto; }

.swiper-button-next,
.swiper-button-prev {
  color: var(--primary) !important;
  background: white;
  width: 44px !important;
  height: 44px !important;
  border-radius: 50%;
  box-shadow: var(--shadow-md);
}

.swiper-button-next::after,
.swiper-button-prev::after {
  font-size: 14px !important;
  font-weight: 700;
}

.swiper-pagination-bullet-active {
  background: var(--primary) !important;
}

/* =============================================
   MARQUEE STRIP
   ============================================= */
.marquee-strip {
  background: var(--accent);
  padding: 10px 0;
  overflow: hidden;
  position: relative;
}

.marquee-content {
  display: flex;
  gap: 60px;
  animation: marquee 25s linear infinite;
  white-space: nowrap;
}

.marquee-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
  font-size: 0.85rem;
  font-weight: 500;
}

.marquee-item i {
  color: var(--gold-light);
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* =============================================
   VIDEO PLAY BUTTON
   ============================================= */
.play-btn {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 0 0 0 rgba(227,30,36,0.4);
  animation: playPulse 2s infinite;
  padding-left: 4px;
}

.play-btn:hover {
  transform: scale(1.1);
  background: var(--primary);
}

@keyframes playPulse {
  0% { box-shadow: 0 0 0 0 rgba(227,30,36,0.4); }
  70% { box-shadow: 0 0 0 15px rgba(227,30,36,0); }
  100% { box-shadow: 0 0 0 0 rgba(227,30,36,0); }
}

/* =============================================
   RESPONSIVE ANIMATIONS
   ============================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  .hero-bg { background-attachment: scroll; }
  .parallax-section { background-attachment: scroll; }
}

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