/* ========================================
   ADVANCED BEACH ANIMATIONS
   Creative effects and modern interactions
   ======================================== */

/* WAVE BACKGROUND ANIMATION */
@keyframes waveAnimation {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(100%);
  }
}

.wave-bg {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 200%;
  height: 100px;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120"><path d="M0,60 Q300,30 600,60 T1200,60 L1200,120 L0,120 Z" fill="rgba(0,187,216,0.3)" stroke="rgba(0,187,216,0.5)" stroke-width="2"/></svg>');
  background-size: 50% 100%;
  animation: waveAnimation 15s linear infinite;
  z-index: 1;
}

/* FLOATING ELEMENTS */
@keyframes float {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }
  25% {
    transform: translateY(-20px) rotate(2deg);
  }
  75% {
    transform: translateY(-20px) rotate(-2deg);
  }
}

.float-element {
  animation: float 4s ease-in-out infinite;
}

/* GLOW PULSE ANIMATION */
@keyframes glowPulse {
  0%,
  100% {
    box-shadow: 0 0 10px rgba(0, 180, 216, 0.3);
  }
  50% {
    box-shadow: 0 0 30px rgba(0, 180, 216, 0.8);
  }
}

.glow-element {
  animation: glowPulse 2s ease-in-out infinite;
}

/* SHIMMER EFFECT */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.shimmer-effect {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.2) 20%,
    rgba(255, 255, 255, 0.5) 50%,
    rgba(255, 255, 255, 0)
  );
  background-size: 1000px 100%;
  animation: shimmer 3s infinite;
}

/* BUBBLE RISE ANIMATION */
@keyframes bubbleRise {
  0% {
    transform: translateY(0px) translateX(0px);
    opacity: 1;
  }
  100% {
    transform: translateY(-100vh) translateX(50px);
    opacity: 0;
  }
}

.bubble {
  position: absolute;
  bottom: 0;
  border-radius: 50%;
  background: radial-gradient(
    circle at 35% 35%,
    rgba(255, 255, 255, 0.8),
    rgba(0, 180, 216, 0.4)
  );
  pointer-events: none;
}

.bubble::before {
  content: "";
  position: absolute;
  top: 10%;
  left: 10%;
  width: 20%;
  height: 20%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
}

/* PARALLAX CARDS */
@keyframes parallelShift {
  0% {
    transform: translateY(0px) translateX(0px);
  }
  50% {
    transform: translateY(-10px) translateX(5px);
  }
  100% {
    transform: translateY(0px) translateX(0px);
  }
}

.parallax-card {
  animation: parallelShift 5s ease-in-out infinite;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* GRADIENT ANIMATION */
@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.gradient-animated {
  background-size: 200% 200%;
  animation: gradientShift 8s ease infinite;
}

/* FLIP CARD EFFECT */
@keyframes flipIn {
  from {
    transform: rotateY(90deg);
    opacity: 0;
  }
  to {
    transform: rotateY(0deg);
    opacity: 1;
  }
}

.flip-card {
  animation: flipIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.flip-card:nth-child(2) {
  animation-delay: 0.1s;
}

.flip-card:nth-child(3) {
  animation-delay: 0.2s;
}

/* SCALE GROW ANIMATION */
@keyframes scaleGrow {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.scale-grow {
  animation: scaleGrow 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* TEXT REVEAL ANIMATION */
@keyframes textReveal {
  0% {
    width: 0;
    opacity: 0;
  }
  100% {
    width: 100%;
    opacity: 1;
  }
}

.text-reveal {
  overflow: hidden;
  white-space: nowrap;
  animation: textReveal 1s ease-out forwards;
}

/* SLIDE IN ANIMATIONS */
@keyframes slideInLeft {
  from {
    transform: translateX(-100px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideInRight {
  from {
    transform: translateX(100px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.slide-in-left {
  animation: slideInLeft 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.slide-in-right {
  animation: slideInRight 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* BOUNCE EFFECT */
@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  25% {
    transform: translateY(-10px);
  }
  50% {
    transform: translateY(0);
  }
  75% {
    transform: translateY(-5px);
  }
}

.bounce {
  animation: bounce 1s ease-in-out infinite;
}

/* POP-IN ANIMATION */
@keyframes popIn {
  0% {
    transform: scale(0) rotate(0deg);
    opacity: 0;
  }
  50% {
    transform: scale(1.1) rotate(10deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

.pop-in {
  animation: popIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* FADE IN & UP */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(60px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.8s ease-out forwards;
}

/* ROTATE IN */
@keyframes rotateIn {
  from {
    transform: rotate(-360deg) scale(0);
    opacity: 0;
  }
  to {
    transform: rotate(0deg) scale(1);
    opacity: 1;
  }
}

.rotate-in {
  animation: rotateIn 1s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* UNDERLINE ANIMATION */
@keyframes underlineGrow {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

.underline-grow::after {
  content: "";
  display: block;
  height: 3px;
  background: linear-gradient(90deg, #00b4d8, #06ffa5);
  animation: underlineGrow 0.8s ease-out;
  border-radius: 2px;
}

/* HOVER LIFT EFFECT */
.hover-lift {
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hover-lift:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* SMOOTH SCROLL BEHAVIOR */
html {
  scroll-behavior: smooth;
}

/* PAGE TRANSITION FADE */
@keyframes pageTransition {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body {
  animation: pageTransition 0.6s ease-out;
}

/* STAGGERED LIST ANIMATION */
.stagger-item {
  animation: fadeInUp 0.6s ease-out forwards;
}

.stagger-item:nth-child(1) {
  animation-delay: 0s;
}
.stagger-item:nth-child(2) {
  animation-delay: 0.1s;
}
.stagger-item:nth-child(3) {
  animation-delay: 0.2s;
}
.stagger-item:nth-child(4) {
  animation-delay: 0.3s;
}
.stagger-item:nth-child(5) {
  animation-delay: 0.4s;
}
.stagger-item:nth-child(n + 6) {
  animation-delay: calc(0.1s * (n - 5));
}

/* SPOTLIGHT EFFECT */
@keyframes spotlight {
  0% {
    box-shadow: 0 0 0px rgba(0, 180, 216, 0);
  }
  50% {
    box-shadow: 0 0 30px rgba(0, 180, 216, 0.8);
  }
  100% {
    box-shadow: 0 0 0px rgba(0, 180, 216, 0);
  }
}

.spotlight {
  animation: spotlight 2s ease-in-out infinite;
}

/* HEARTBEAT ANIMATION */
@keyframes heartbeat {
  0%,
  100% {
    transform: scale(1);
  }
  14% {
    transform: scale(1.15);
  }
  28% {
    transform: scale(1);
  }
}

.heartbeat {
  animation: heartbeat 1.3s ease-in-out infinite;
}

/* SWIPE ANIMATION */
@keyframes swipeRight {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.swipe-right {
  animation: swipeRight 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* LINK HOVER EFFECTS */
a.hover-glow {
  transition: all 0.3s ease;
}

a.hover-glow:hover {
  text-shadow: 0 0 10px rgba(0, 180, 216, 0.6);
  color: #00b4d8;
}

/* ICON ROTATION ON HOVER */
.icon-rotate {
  transition: transform 0.3s ease;
}

.icon-rotate:hover {
  transform: rotate(360deg) scale(1.2);
}

/* SMOOTH TRANSITIONS */
* {
  transition:
    color 0.3s ease,
    background-color 0.3s ease,
    border-color 0.3s ease;
}

button,
a {
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* RESPONSIVE ANIMATION ADJUSTMENTS */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* MOBILE OPTIMIZATIONS */
@media (max-width: 768px) {
  .wave-bg {
    height: 60px;
  }

  .float {
    animation: float 3s ease-in-out infinite;
  }

  .glow-pulse {
    animation: glowPulse 1.5s ease-in-out infinite;
  }
}
