/* ============================================
   EFFECTS.CSS - Premium Cursor & Parallax Effects
   ============================================ */

/* ============================================
   1) CURSOR GLOW EFFECT
   ============================================ */

.cursor-glow {
  position: fixed;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(45, 134, 89, 0.15) 0%, rgba(45, 134, 89, 0.05) 40%, transparent 70%);
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 9999;
  transition: opacity 0.3s ease;
  opacity: 0;
  mix-blend-mode: screen;
  will-change: transform;
}

/* Hide cursor glow on touch devices */
@media (hover: none) and (pointer: coarse) {
  .cursor-glow {
    display: none !important;
  }
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .cursor-glow {
    display: none !important;
  }
}

/* Local hover glow for interactive elements */
.hover-glow {
  position: relative;
  overflow: hidden;
}

.hover-glow::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(45, 134, 89, 0.3), transparent 70%);
  transform: translate(-50%, -50%);
  transition: width 0.4s ease, height 0.4s ease;
  pointer-events: none;
  z-index: 0;
}

.hover-glow:hover::before {
  /* Disabled glow expansion */
}

.hover-glow > * {
  position: relative;
  z-index: 1;
}

/* ============================================
   2) PARALLAX CONTAINERS
   ============================================ */

.parallax-container {
  position: relative;
  overflow: hidden;
}

.parallax-layer {
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

/* Parallax speeds - data-speed attribute controls movement */
.parallax-slow {
  transform: translateY(0);
}

.parallax-medium {
  transform: translateY(0);
}

.parallax-fast {
  transform: translateY(0);
}

/* Disable parallax on mobile for performance */
@media (max-width: 968px) {
  .parallax-layer {
    transform: none !important;
  }
}

/* Disable parallax if reduced motion preferred */
@media (prefers-reduced-motion: reduce) {
  .parallax-layer {
    transform: none !important;
    transition: none !important;
  }
}

/* ============================================
   3) PAGE TRANSITION EFFECTS
   ============================================ */

.page-transition {
  animation: pageEnter 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* Smooth body fade */
body.loading {
  opacity: 0;
}

body.loaded {
  opacity: 1;
  transition: opacity 0.4s ease;
}

/* ============================================
   4) ENHANCED CARD EFFECTS
   ============================================ */

.card-premium {
  position: relative;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transform-style: preserve-3d;
}

.card-premium::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.card-premium:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 32px rgba(45, 134, 89, 0.25), 0 0 20px rgba(45, 134, 89, 0.1);
  border-color: var(--primary);
}

.card-premium:hover::after {
  opacity: 1;
}

/* ============================================
   5) WHATSAPP BUTTON ENHANCEMENTS
   ============================================ */

.whatsapp-btn {
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.whatsapp-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.whatsapp-btn:active {
  transform: translateY(0);
}

.whatsapp-btn-icon {
  font-size: 1.2rem;
}

/* WhatsApp navbar button */
.whatsapp-nav-btn {
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
  text-decoration: none;
  border: none;
}

.whatsapp-nav-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(37, 211, 102, 0.5);
}

/* ============================================
   6) STAR RATING COMPONENT
   ============================================ */

.star-rating {
  display: flex;
  gap: 0.5rem;
  font-size: 2rem;
  cursor: pointer;
  user-select: none;
}

.star {
  color: #ddd;
  transition: all 0.2s ease;
  cursor: pointer;
}

.star.active,
.star.hover {
  color: #ffd700;
  transform: scale(1.1);
}

.star:hover {
  transform: scale(1.2);
}

/* Star rating display (read-only) */
.star-rating-display {
  display: flex;
  gap: 0.3rem;
  font-size: 1.2rem;
}

.star-rating-display .star {
  cursor: default;
}

.star-rating-display .star.filled {
  color: #ffd700;
}

.star-rating-display .star.empty {
  color: #ddd;
}

/* ============================================
   7) FEEDBACK CARD STYLING
   ============================================ */

.feedback-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.feedback-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--gradient-primary);
}

.feedback-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.feedback-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.feedback-author {
  font-weight: 600;
  color: var(--primary);
  font-size: 1.1rem;
}

.feedback-date {
  font-size: 0.85rem;
  color: var(--text-light);
}

.feedback-message {
  color: var(--text-dark);
  line-height: 1.7;
  margin: 1rem 0;
}

.feedback-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* ============================================
   8) SMOOTH SCROLL BEHAVIOR
   ============================================ */

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* ============================================
   9) LOADING STATES
   ============================================ */

.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spinner 0.8s linear infinite;
}

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

/* ============================================
   10) ENHANCED GRADIENT BACKGROUNDS
   ============================================ */

.gradient-bg-animated {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  background-size: 200% 200%;
  animation: gradientShift 8s ease infinite;
}

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

/* ============================================
   11) FLOATING SHAPES (Enhanced for Parallax)
   ============================================ */

.floating-shapes {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.floating-shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.1;
  filter: blur(40px);
  animation: float 20s ease-in-out infinite;
}

.floating-shape:nth-child(1) {
  width: 300px;
  height: 300px;
  top: 10%;
  left: 10%;
  background: var(--primary);
  animation-delay: 0s;
}

.floating-shape:nth-child(2) {
  width: 200px;
  height: 200px;
  top: 60%;
  right: 15%;
  background: var(--accent);
  animation-delay: 3s;
}

.floating-shape:nth-child(3) {
  width: 250px;
  height: 250px;
  bottom: 10%;
  left: 30%;
  background: var(--primary);
  animation-delay: 6s;
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(30px, -30px) scale(1.1);
  }
  66% {
    transform: translate(-20px, 20px) scale(0.9);
  }
}

/* ============================================
   12) RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 968px) {
  .cursor-glow {
    display: none;
  }
  
  .hover-glow::before {
    display: none;
  }
  
  .card-premium:hover {
    transform: none;
  }
  
  .floating-shape {
    display: none;
  }
}

@media (max-width: 640px) {
  .star-rating {
    font-size: 1.5rem;
    gap: 0.3rem;
  }
  
  .whatsapp-btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }
  
  .feedback-card {
    padding: 1rem;
  }
}

/* ============================================
   13) ACCESSIBILITY
   ============================================ */

/* Focus states for keyboard navigation */
.whatsapp-btn:focus,
.whatsapp-nav-btn:focus,
.star:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .floating-shape {
    animation: none;
  }
  
  .gradient-bg-animated {
    animation: none;
  }
}
