/**
 * Enhanced Animations & Creative Visual Effects
 * Adds more dynamic and modern animations throughout the page
 */

/* ===========================
   ADVANCED SCROLL ANIMATIONS
   =========================== */

/* Fade in on scroll for sections */
[data-aos] {
  opacity: 0;
  will-change: transform, opacity;
}

[data-aos].aos-animate {
  opacity: 1;
}

/* ===========================
   BUTTON ANIMATIONS
   =========================== */

.btn {
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition:
    width 0.6s,
    height 0.6s;
  z-index: 0;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn-primary:hover::before {
  background: rgba(255, 255, 255, 0.2);
}

.btn-lg {
  font-weight: 700;
  padding: 16px 45px;
  font-size: 1.1rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-lg:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}

/* ===========================
   CARD & SECTION ANIMATIONS
   =========================== */

.card,
.package-card,
.feature-card {
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform: translateZ(0);
  backface-visibility: hidden;
}

.card:hover,
.package-card:hover,
.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(56, 182, 255, 0.25);
}

.card {
  border-radius: 15px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.card:hover {
  border-color: rgba(56, 182, 255, 0.5);
  background: rgba(56, 182, 255, 0.05);
}

/* ===========================
   TEXT ANIMATIONS
   =========================== */

.animated-text {
  position: relative;
  display: inline-block;
}

.animated-text::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, #8b9ba3, #aeaab9);
  transition: width 0.4s ease;
  border-radius: 2px;
}

.animated-text:hover::after {
  width: 100%;
}

/* ===========================
   ICON ANIMATIONS
   =========================== */

.icon-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: linear-gradient(
    135deg,
    rgba(139, 155, 163, 0.1),
    rgba(174, 170, 185, 0.1)
  );
  border-radius: 12px;
  transition: all 0.3s ease;
  border: 2px solid rgba(139, 155, 163, 0.2);
}

.icon-box:hover {
  background: linear-gradient(
    135deg,
    rgba(139, 155, 163, 0.2),
    rgba(174, 170, 185, 0.2)
  );
  border-color: rgba(139, 155, 163, 0.5);
  transform: rotate(5deg) scale(1.1);
  box-shadow: 0 8px 20px rgba(139, 155, 163, 0.2);
}

.icon-box i {
  font-size: 1.8rem;
  color: #8b9ba3;
  transition: all 0.3s ease;
}

.icon-box:hover i {
  transform: scale(1.2);
}

/* ===========================
   BADGE & LABEL ANIMATIONS
   =========================== */

.badge {
  display: inline-block;
  padding: 6px 16px;
  background: linear-gradient(135deg, #8b9ba3, #aeaab9);
  color: white;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px rgba(139, 155, 163, 0.3);
  animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 4px 15px rgba(139, 155, 163, 0.3);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(139, 155, 163, 0.5);
  }
}

/* ===========================
   GRADIENT TEXT & BACKGROUNDS
   =========================== */

.gradient-text {
  background: linear-gradient(135deg, #8b9ba3, #fdbf1a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
}

.gradient-bg {
  background: linear-gradient(
    135deg,
    rgba(139, 155, 163, 0.1),
    rgba(174, 170, 185, 0.05)
  );
  border-radius: 20px;
  padding: 3px;
  position: relative;
}

.gradient-bg::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(139, 155, 163, 0.3),
    transparent
  );
  border-radius: 20px;
  animation: shimmer 3s infinite;
  pointer-events: none;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* ===========================
   DIVIDER & SEPARATOR ANIMATIONS
   =========================== */

.divider {
  height: 3px;
  background: linear-gradient(90deg, transparent, #8b9ba3, transparent);
  margin: 30px 0;
  border-radius: 2px;
  animation: expandWidth 2s ease-in-out infinite;
}

@keyframes expandWidth {
  0%,
  100% {
    width: 30%;
    margin-left: 35%;
  }
  50% {
    width: 60%;
    margin-left: 20%;
  }
}

/* ===========================
   LOADING & PROGRESS ANIMATIONS
   =========================== */

.progress-bar {
  height: 4px;
  background: rgba(56, 182, 255, 0.2);
  border-radius: 2px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #38b6ff, #fdbf1a);
  border-radius: 2px;
  animation: progressFill 1.5s ease-out;
}

@keyframes progressFill {
  from {
    width: 0;
  }
}

.skeleton {
  background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
  background-size: 200% 100%;
  animation: skeletonLoading 1s infinite;
  border-radius: 8px;
}

@keyframes skeletonLoading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ===========================
   HOVER LIFT EFFECTS
   =========================== */

.hover-lift {
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

/* ===========================
   STAGGERED ANIMATIONS
   =========================== */

.staggered-item {
  animation: fadeInUp 0.6s ease forwards;
}

.staggered-item:nth-child(1) {
  animation-delay: 0.1s;
}
.staggered-item:nth-child(2) {
  animation-delay: 0.2s;
}
.staggered-item:nth-child(3) {
  animation-delay: 0.3s;
}
.staggered-item:nth-child(4) {
  animation-delay: 0.4s;
}
.staggered-item:nth-child(5) {
  animation-delay: 0.5s;
}
.staggered-item:nth-child(6) {
  animation-delay: 0.6s;
}

/* ===========================
   REVEAL ON SCROLL EFFECTS
   =========================== */

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===========================
   SMOOTH TRANSITIONS
   =========================== */

* {
  scroll-behavior: smooth;
}

/* Prevent layout shift on hover */
button,
a {
  transition-property: all;
  transition-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1);
  transition-duration: 0.3s;
}

/* ===========================
   GLASS MORPHISM EFFECTS
   =========================== */

.glass-effect {
  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);
  border-radius: 10px;
}

.glass-effect:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.header.glass-effect:hover {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(0, 0, 0, 0.05);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.header.scrolled.glass-effect:hover {
  background: linear-gradient(
    135deg,
    rgba(10, 61, 98, 0.98) 0%,
    rgba(8, 52, 84, 0.98) 100%
  );
  box-shadow: 0 12px 40px rgba(10, 61, 98, 0.25);
}

/* ===========================
   SCROLLBAR STYLING
   =========================== */

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(139, 155, 163, 0.1);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #8b9ba3, #aeaab9);
  border-radius: 10px;
  transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #aeaab9, #8b9ba3);
  box-shadow: 0 0 6px rgba(139, 155, 163, 0.5);
}

/* ===========================
   FOCUS VISIBLE ENHANCEMENTS
   =========================== */

:focus-visible {
  outline: 2px solid #38b6ff;
  outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid #8b9ba3;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(139, 155, 163, 0.2);
  border-radius: 4px;
}

/* ===========================
   RESPONSIVE ANIMATIONS
   =========================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===========================
   DARK MODE ANIMATION ADJUSTMENTS
   =========================== */

@media (prefers-color-scheme: dark) {
  .card {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(56, 182, 255, 0.2);
  }

  .glass-effect {
    background: rgba(0, 0, 0, 0.3);
  }

  ::-webkit-scrollbar-track {
    background: rgba(56, 182, 255, 0.05);
  }
}

/* ===========================
   CREATIVE PAGE TRANSITIONS
   =========================== */

.page-enter {
  animation: pageEnter 0.6s ease;
}

@keyframes pageEnter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-exit {
  animation: pageExit 0.4s ease;
}

@keyframes pageExit {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

/* ===========================
   SPOTLIGHT EFFECT
   =========================== */

.spotlight {
  position: relative;
  overflow: hidden;
}

.spotlight::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(56, 182, 255, 0.3), transparent);
  transform: translate(-50%, -50%);
  animation: spotlight 8s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes spotlight {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.5;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 0.8;
  }
}

/* ===========================
   SMOOTH COLOR TRANSITIONS
   =========================== */

.color-transition {
  transition:
    background-color 0.4s ease,
    color 0.4s ease,
    border-color 0.4s ease;
}

/* Ensure images animate smoothly */
img {
  transition:
    transform 0.3s ease,
    filter 0.3s ease;
}

img:hover {
  transform: scale(1.02);
  filter: brightness(1.05);
}
