/* 
 * Animations for domain.com
 * Pure CSS animations without JavaScript
 */

/* Fade In Animation */
@keyframes fadeIn {
  from { 
    opacity: 0; 
  }
  to { 
    opacity: 1; 
  }
}

.fade-in {
  animation: fadeIn 0.8s ease forwards;
}

/* Slide Up Animation */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.slide-up {
  animation: slideUp 0.8s ease forwards;
}

/* Slide in from Left */
@keyframes slideFromLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.slide-from-left {
  animation: slideFromLeft 0.8s ease forwards;
}

/* Slide in from Right */
@keyframes slideFromRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.slide-from-right {
  animation: slideFromRight 0.8s ease forwards;
}

/* Zoom In Animation */
@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.zoom-in {
  animation: zoomIn 0.8s ease forwards;
}

/* Bounce Animation */
@keyframes bounce {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0);
  }
}

.bounce {
  animation: bounce 2s ease infinite;
}

/* Pulse Animation */
@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.pulse {
  animation: pulse 2s ease infinite;
}

/* Rotate Animation */
@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.rotate {
  animation: rotate 3s linear infinite;
}

/* Shimmer Effect */
@keyframes shimmer {
  0% {
    background-position: -100% 0;
  }
  100% {
    background-position: 100% 0;
  }
}

.shimmer {
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,0.2), rgba(255,255,255,0));
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

/* Fade in on scroll with CSS (no JS) */
.reveal {
  opacity: 1; /* Changed from 0 to 1 so elements are visible by default */
  transition: all 1s ease;
}

.reveal.visible {
  opacity: 1;
}

/* Delayed animations - Apply these classes along with animation classes */
.delay-100 {
  animation-delay: 0.1s;
}

.delay-200 {
  animation-delay: 0.2s;
}

.delay-300 {
  animation-delay: 0.3s;
}

.delay-400 {
  animation-delay: 0.4s;
}

.delay-500 {
  animation-delay: 0.5s;
}

/* Form field focus animations */
.form-control {
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.form-control:focus {
  transform: translateY(-2px);
  border-color: var(--amber);
}

/* Button hover animation */
.btn {
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
  z-index: -1;
}

.btn:hover::after {
  height: 100%;
}

/* Card hover effects */
.card-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* CSS-only accordion animation for FAQ section */
.faq-question {
  position: relative;
  cursor: pointer;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease;
}

.faq-item.active .faq-answer {
  max-height: 500px; /* Adjust based on your content */
}

/* Loading spinner animation */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-spinner {
  width: 30px;
  height: 30px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--amber);
  animation: spin 1s ease-in-out infinite;
}

/* CSS-only image hover zoom effect */
.img-zoom {
  overflow: hidden;
}

.img-zoom img {
  transition: transform 0.5s ease;
}

.img-zoom:hover img {
  transform: scale(1.05);
}

/* CSS-only underline animation */
.animated-underline {
  position: relative;
}

.animated-underline::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -2px;
  left: 0;
  background-color: var(--amber);
  transition: width 0.3s ease;
}

.animated-underline:hover::after {
  width: 100%;
}

/* CSS-only gradient text */
.gradient-text {
  background: linear-gradient(90deg, var(--primary-blue), var(--amber));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
}

/* CSS-only text shadow pulsing */
@keyframes textShadowPulse {
  0% {
    text-shadow: 0 0 0 rgba(18, 63, 109, 0.6);
  }
  50% {
    text-shadow: 0 0 10px rgba(18, 63, 109, 0.8);
  }
  100% {
    text-shadow: 0 0 0 rgba(18, 63, 109, 0.6);
  }
}

.text-shadow-pulse {
  animation: textShadowPulse 2s infinite;
} 