/**
 * Bali Trips Dynamic Styles
 * Enhanced animations and visual effects
 */

/* ============================================
   GLOBAL ANIMATIONS
   ============================================ */
@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 slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

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

@keyframes glow {
  0%,
  100% {
    box-shadow: 0 0 5px rgba(249, 115, 22, 0.5);
  }
  50% {
    box-shadow: 0 0 20px rgba(249, 115, 22, 0.8),
      0 0 30px rgba(249, 115, 22, 0.6);
  }
}

/* ============================================
   HERO SECTION ENHANCEMENTS
   ============================================ */
.hero-title {
  animation: fadeInDown 1s ease-out;
}

.hero-subtitle {
  animation: fadeInUp 1s ease-out 0.2s backwards;
}

.hero-badge {
  animation: scaleIn 0.6s ease-out 0.4s backwards;
}

.hero-services {
  animation: fadeInUp 1s ease-out 0.6s backwards;
}

.hero-form {
  animation: slideInRight 1s ease-out 0.8s backwards;
}

/* ============================================
   PACKAGE CARDS ENHANCEMENTS
   ============================================ */
.package-card {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.package-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

.package-card:hover::before {
  left: 100%;
}

.package-card:hover {
  transform: translateY(-10px) scale(1.03);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

/* Image zoom effect disabled */
/* .package-card img {
  transition: transform 0.6s ease;
}

.package-card:hover img {
  transform: scale(1.15) rotate(2deg);
} */

.package-badge {
  animation: pulse 2s infinite;
}

/* ============================================
   FORM ENHANCEMENTS
   ============================================ */
.form-input,
.form-select,
.form-textarea {
  transition: all 0.3s ease;
  position: relative;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(249, 115, 22, 0.15);
}

.form-label {
  transition: all 0.3s ease;
}

.form-input:focus + .form-label,
.form-select:focus + .form-label,
.form-textarea:focus + .form-label {
  color: #f97316;
  transform: translateY(-2px);
}

/* Floating label effect */
.form-group {
  position: relative;
}

.form-group input:focus ~ label,
.form-group input:not(:placeholder-shown) ~ label {
  transform: translateY(-1.5rem) scale(0.85);
  color: #f97316;
}

/* ============================================
   BUTTON ENHANCEMENTS
   ============================================ */
.btn-primary {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.btn-primary::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before {
  width: 300px;
  height: 300px;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(249, 115, 22, 0.4);
}

.btn-primary:active {
  transform: translateY(-1px);
}

/* ============================================
   TESTIMONIAL CARDS
   ============================================ */
.testimonial-card {
  transition: all 0.4s ease;
  animation: fadeInUp 0.6s ease-out;
}

.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

.testimonial-avatar {
  transition: transform 0.3s ease;
}

.testimonial-card:hover .testimonial-avatar {
  transform: scale(1.1) rotate(5deg);
}

.testimonial-rating {
  display: inline-flex;
  gap: 2px;
}

.testimonial-rating span {
  animation: starPop 0.4s ease backwards;
}

.testimonial-rating span:nth-child(1) {
  animation-delay: 0.1s;
}
.testimonial-rating span:nth-child(2) {
  animation-delay: 0.2s;
}
.testimonial-rating span:nth-child(3) {
  animation-delay: 0.3s;
}
.testimonial-rating span:nth-child(4) {
  animation-delay: 0.4s;
}
.testimonial-rating span:nth-child(5) {
  animation-delay: 0.5s;
}

@keyframes starPop {
  0% {
    transform: scale(0) rotate(-180deg);
    opacity: 0;
  }
  50% {
    transform: scale(1.2) rotate(10deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

/* ============================================
   BENEFITS COMPARISON TABLE
   ============================================ */
.benefits-table {
  animation: fadeInUp 0.8s ease-out;
}

.benefits-row {
  transition: all 0.3s ease;
}

.benefits-row:hover {
  background: linear-gradient(to right, #fef3c7, #fff);
  transform: translateX(5px);
}

.benefit-check {
  animation: scaleIn 0.5s ease backwards;
}

.benefit-cross {
  animation: scaleIn 0.5s ease backwards;
}

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

.loading-spinner {
  border: 3px solid rgba(249, 115, 22, 0.1);
  border-top-color: #f97316;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */
.scroll-reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s ease-out;
}

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

/* ============================================
   BADGE ANIMATIONS
   ============================================ */
.badge-animated {
  position: relative;
  animation: float 3s ease-in-out infinite;
}

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

/* ============================================
   PRICE DISPLAY
   ============================================ */
.price-tag {
  position: relative;
  display: inline-block;
}

.price-tag::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(to right, #f97316, #ea580c);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.price-tag:hover::after {
  transform: scaleX(1);
}

/* ============================================
   IMAGE HOVER EFFECTS
   ============================================ */
.image-zoom {
  overflow: hidden;
}

.image-zoom img {
  transition: transform 0.6s ease;
}

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

/* ============================================
   GRADIENT TEXT
   ============================================ */
.gradient-text {
  background: linear-gradient(135deg, #f97316, #ea580c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s infinite;
}

/* ============================================
   SECTION DIVIDERS
   ============================================ */
.section-divider {
  height: 2px;
  background: linear-gradient(to right, transparent, #f97316, transparent);
  margin: 2rem 0;
  animation: fadeInUp 1s ease-out;
}

/* ============================================
   TOOLTIP STYLES
   ============================================ */
.tooltip {
  position: relative;
}

.tooltip::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.9);
  color: white;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
}

.tooltip:hover::before {
  opacity: 1;
  transform: translateX(-50%) translateY(-5px);
}

/* ============================================
   RESPONSIVE ANIMATIONS
   ============================================ */
@media (max-width: 768px) {
  .package-card:hover {
    transform: translateY(-5px) scale(1.02);
  }

  .hero-form {
    animation: fadeInUp 1s ease-out 0.8s backwards;
  }
}

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

/* ============================================
   CUSTOM SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, #f97316, #ea580c);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(to bottom, #ea580c, #c2410c);
}

/* ============================================
   SELECTION HIGHLIGHT
   ============================================ */
::selection {
  background: #f97316;
  color: white;
}

::-moz-selection {
  background: #f97316;
  color: white;
}

/* ============================================
   FOCUS STYLES
   ============================================ */
*:focus {
  outline: 2px solid #f97316;
  outline-offset: 2px;
}

button:focus,
a:focus {
  outline: 2px solid #f97316;
  outline-offset: 4px;
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
  .no-print {
    display: none !important;
  }
}
