/* =============================================
   AFTR6 — Animations, Backgrounds & Visual Effects
   =============================================
   Complements style.css — adds:
   1. Background decorative effects (particles, gradients, glows)
   2. Scroll-triggered entrance animations
   3. Micro-interactions & hover effects
   4. Section-specific background imagery
   5. Placeholder image styles
   ============================================= */

/* ===== ADDITIONAL KEYFRAMES ===== */

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to { opacity: 1; transform: translateX(0); }
}

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

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

@keyframes slideInUp {
  from { opacity: 0; transform: translateY(60px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

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

@keyframes rotateGlow {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: 0.4; }
  50% { transform: scale(1.05); opacity: 0.7; }
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes borderGlow {
  0%, 100% { border-color: rgba(45, 90, 78, 0.15); }
  50% { border-color: rgba(62, 180, 137, 0.4); }
}

@keyframes countUp {
  from { opacity: 0; transform: scale(0.5); }
  to { opacity: 1; transform: scale(1); }
}

/* ===== STAGGERED REVEAL VARIANTS ===== */

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

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

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

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

.reveal-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Stagger delays for grid items */
.trust-card:nth-child(1),
.service-card:nth-child(1),
.step-card:nth-child(1),
.package-card:nth-child(1),
.testimonial-card:nth-child(1),
.value-card:nth-child(1) { transition-delay: 0.05s; }

.trust-card:nth-child(2),
.service-card:nth-child(2),
.step-card:nth-child(2),
.package-card:nth-child(2),
.testimonial-card:nth-child(2),
.value-card:nth-child(2) { transition-delay: 0.12s; }

.trust-card:nth-child(3),
.service-card:nth-child(3),
.step-card:nth-child(3),
.package-card:nth-child(3),
.testimonial-card:nth-child(3),
.value-card:nth-child(3) { transition-delay: 0.2s; }

.trust-card:nth-child(4),
.service-card:nth-child(4),
.step-card:nth-child(4),
.value-card:nth-child(4) { transition-delay: 0.28s; }

.trust-card:nth-child(5),
.service-card:nth-child(5),
.value-card:nth-child(5) { transition-delay: 0.36s; }

.service-card:nth-child(6) { transition-delay: 0.44s; }

/* ===== HERO ENHANCEMENTS ===== */

/* Animated gradient overlay for hero */
.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(
    ellipse 80% 60% at 50% 40%,
    rgba(62, 180, 137, 0.08) 0%,
    transparent 60%
  );
  animation: breathe 6s ease-in-out infinite;
  pointer-events: none;
}

/* Floating particles effect for hero */
.hero-section::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background-image:
    radial-gradient(2px 2px at 20% 30%, rgba(255,255,255,0.12) 0%, transparent 100%),
    radial-gradient(2px 2px at 40% 70%, rgba(62,180,137,0.15) 0%, transparent 100%),
    radial-gradient(1px 1px at 60% 20%, rgba(255,255,255,0.08) 0%, transparent 100%),
    radial-gradient(1px 1px at 80% 60%, rgba(168,85,247,0.1) 0%, transparent 100%),
    radial-gradient(2px 2px at 10% 80%, rgba(236,72,153,0.08) 0%, transparent 100%),
    radial-gradient(1px 1px at 95% 15%, rgba(255,255,255,0.06) 0%, transparent 100%),
    radial-gradient(1px 1px at 50% 50%, rgba(62,180,137,0.1) 0%, transparent 100%),
    radial-gradient(2px 2px at 75% 85%, rgba(255,255,255,0.05) 0%, transparent 100%),
    radial-gradient(1px 1px at 30% 10%, rgba(249,115,22,0.08) 0%, transparent 100%);
  animation: float 12s ease-in-out infinite;
  pointer-events: none;
}

/* Hero scroll indicator */
.hero-content::after {
  content: '';
  display: block;
  width: 1px;
  height: 50px;
  background: linear-gradient(to bottom, rgba(62,180,137,0.6), transparent);
  margin: 48px auto 0;
  animation: pulse 2s ease-in-out infinite;
}

/* ===== SECTION BACKGROUND EFFECTS ===== */

/* Decorative glow orb — applies to trust, services, packages sections */
.trust-section::before,
.services-section::before,
.testimonials-section::before,
.faq-section::before,
.cta-banner::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.trust-section,
.services-section,
.testimonials-section,
.faq-section,
.booking-section {
  position: relative;
  overflow: hidden;
}

/* Green glow — top left */
.trust-section::before {
  top: -150px;
  left: -100px;
  background: radial-gradient(circle, rgba(45, 90, 78, 0.12) 0%, transparent 70%);
  animation: breathe 8s ease-in-out infinite;
}

/* Navy glow — bottom right */
.services-section::before {
  bottom: -120px;
  right: -80px;
  background: radial-gradient(circle, rgba(26, 26, 78, 0.2) 0%, transparent 70%);
  animation: breathe 10s ease-in-out infinite 2s;
}

/* Subtle green glow — center */
.testimonials-section::before {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(62, 180, 137, 0.06) 0%, transparent 60%);
  animation: breathe 12s ease-in-out infinite 4s;
}

/* FAQ section glow */
.faq-section::before {
  top: -100px;
  right: -150px;
  background: radial-gradient(circle, rgba(45, 90, 78, 0.1) 0%, transparent 70%);
  animation: breathe 9s ease-in-out infinite 3s;
}

/* CTA Banner glow */
.cta-banner::after {
  bottom: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(circle, rgba(45, 90, 78, 0.08) 0%, transparent 70%);
  z-index: 0;
}

/* Grid pattern overlay for dark sections */
.trust-section::after,
.booking-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.012) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

/* Ensure content sits above decorative layers */
.trust-section > .container,
.services-section > .container,
.testimonials-section > .container,
.faq-section > .container,
.booking-section > .container,
.cta-banner > .container {
  position: relative;
  z-index: 1;
}

/* ===== PAGE HERO BACKGROUND EFFECTS ===== */

.page-hero {
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(45, 90, 78, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.page-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 15% 25%, rgba(255,255,255,0.06) 0%, transparent 100%),
    radial-gradient(1px 1px at 85% 35%, rgba(62,180,137,0.08) 0%, transparent 100%),
    radial-gradient(1px 1px at 50% 75%, rgba(255,255,255,0.04) 0%, transparent 100%);
  pointer-events: none;
}

.page-hero h1 {
  animation: fadeInUp 0.8s ease both;
}

.page-hero p {
  animation: fadeInUp 0.8s ease 0.2s both;
}

/* ===== CARD MICRO-INTERACTIONS ===== */

/* Glowing border on hover for all cards */
.trust-card:hover,
.service-card:hover,
.value-card:hover,
.step-card:hover,
.testimonial-card:hover,
.package-card:hover {
  box-shadow:
    0 20px 60px rgba(45, 90, 78, 0.15),
    inset 0 0 0 1px rgba(62, 180, 137, 0.1);
}

/* Top gradient line animation on cards */
.trust-card::before,
.step-card::before,
.value-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--green), var(--navy), var(--green));
  background-size: 200% 100%;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.trust-card,
.step-card,
.value-card {
  position: relative;
  overflow: hidden;
}

.trust-card:hover::before,
.step-card:hover::before,
.value-card:hover::before {
  transform: scaleX(1);
  animation: gradientShift 3s ease infinite;
}

/* Icon bounce on card hover */
.trust-icon,
.service-card-icon,
.value-icon {
  transition: transform 0.4s ease;
}

.trust-card:hover .trust-icon,
.service-card:hover .service-card-icon,
.value-card:hover .value-icon {
  transform: scale(1.15) translateY(-4px);
}

/* ===== PACKAGE CARD ENHANCEMENTS ===== */

/* Shimmer effect on featured package badge */
.package-badge {
  background-size: 200% 100%;
  animation: shimmer 3s ease-in-out infinite;
  background-image: linear-gradient(
    90deg,
    #2d5a4e 0%,
    #3eb489 25%,
    #5ec4a0 50%,
    #3eb489 75%,
    #2d5a4e 100%
  );
}

/* Featured package card glow */
.package-card--featured {
  animation: borderGlow 4s ease-in-out infinite;
}

/* Price counter animation */
.package-price {
  animation: countUp 0.6s ease both;
}

/* ===== STAT COUNTER ENHANCEMENTS ===== */

.stat-card {
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    rgba(62, 180, 137, 0.06) 60deg,
    transparent 120deg
  );
  animation: rotateGlow 15s linear infinite;
  pointer-events: none;
}

.stat-number {
  position: relative;
  z-index: 1;
}

.stat-label {
  position: relative;
  z-index: 1;
}

/* ===== TESTIMONIAL ENHANCEMENTS ===== */

.testimonial-card {
  position: relative;
  overflow: hidden;
}

.testimonial-card::before {
  content: '"';
  position: absolute;
  top: -10px;
  right: 20px;
  font-family: var(--font-heading);
  font-size: 120px;
  font-weight: 900;
  color: rgba(62, 180, 137, 0.04);
  pointer-events: none;
  line-height: 1;
}

.testimonial-card p {
  font-style: italic;
}

.testimonial-stars {
  animation: fadeInUp 0.5s ease both;
}

/* ===== GALLERY HOVER ENHANCEMENTS ===== */

.gallery-item::before,
.gallery-masonry-item::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 2px solid transparent;
  border-radius: var(--radius);
  transition: border-color 0.4s ease;
  pointer-events: none;
}

.gallery-item:hover::before,
.gallery-masonry-item:hover::before {
  border-color: rgba(62, 180, 137, 0.4);
}

/* ===== CTA BUTTON PULSE ===== */

.btn-primary {
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(90deg, transparent, rgba(62,180,137,0.3), transparent);
  background-size: 200% 100%;
  border-radius: inherit;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.btn-primary:hover::before {
  opacity: 1;
  animation: shimmer 2s ease infinite;
}

/* ===== FLOATING CTA ENHANCEMENTS ===== */

.float-cta.visible {
  animation: slideInUp 0.5s ease both;
}

.float-cta::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(62,180,137,0.4), rgba(26,26,78,0.4));
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s ease;
  filter: blur(8px);
}

.float-cta:hover::before {
  opacity: 1;
}

/* ===== NAVBAR TRANSITIONS ===== */

.site-header {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.site-logo .logo-six {
  transition: filter 0.4s ease;
}

.site-logo:hover .logo-six {
  filter: brightness(1.3);
}

/* ===== FORM FOCUS ANIMATION ===== */

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  animation: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(45, 90, 78, 0.15), 0 0 20px rgba(62, 180, 137, 0.08);
}

/* ===== FOOTER LINK HOVER ANIMATION ===== */

.footer-col a {
  transition: color var(--transition), transform var(--transition), padding-left var(--transition);
}

.footer-col a:hover {
  padding-left: 6px;
}

/* ===== PLACEHOLDER IMAGE STYLES ===== */

.placeholder-image {
  opacity: 0.8;
  transition: opacity 0.4s ease;
}

.placeholder-image:hover {
  opacity: 1;
}

/* Placeholder loading shimmer for images */
img[data-placeholder="true"]:not(.placeholder-image) {
  background: linear-gradient(
    90deg,
    rgba(26, 26, 78, 0.1) 25%,
    rgba(45, 90, 78, 0.08) 50%,
    rgba(26, 26, 78, 0.1) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

/* ===== BACKGROUND IMAGE HELPERS ===== */

/* Sections that want a subtle textured background */
.bg-texture {
  background-image:
    linear-gradient(rgba(255,255,255,0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.012) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* Sections that want a gradient mesh effect */
.bg-mesh {
  background-image:
    radial-gradient(ellipse at 10% 20%, rgba(45, 90, 78, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 90% 80%, rgba(26, 26, 78, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(62, 180, 137, 0.04) 0%, transparent 60%);
}

/* ===== SCROLL-LINKED PARALLAX CLASSES ===== */

.parallax-bg {
  will-change: transform;
  transition: transform 0.1s linear;
}

/* ===== LOADING STATE ===== */

.loading-skeleton {
  background: linear-gradient(
    90deg,
    rgba(26, 26, 78, 0.15) 25%,
    rgba(45, 90, 78, 0.1) 50%,
    rgba(26, 26, 78, 0.15) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius);
}

/* ===== REDUCED MOTION ===== */

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

  .reveal,
  .reveal-left,
  .reveal-right,
  .reveal-scale {
    opacity: 1;
    transform: none;
  }
}
