/* Animations and modern effects for the website */

/* Fade-in animation */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Pulse animation for call-to-action buttons */
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* Hover shine effect */
@keyframes shine {
  from {
    background-position: -100% 0;
  }
  to {
    background-position: 200% 0;
  }
}

/* Animated gradient for hero background */
@keyframes gradientAnimation {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* SVG filter animation for glowing effect */
@keyframes filterPulse {
  0% { filter: drop-shadow(0 0 2px rgba(9, 117, 122, 0.2)); }
  50% { filter: drop-shadow(0 0 10px rgba(9, 117, 122, 0.5)); }
  100% { filter: drop-shadow(0 0 2px rgba(9, 117, 122, 0.2)); }
}

/* Rotation animation for icons */
@keyframes rotateIcon {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Floating text effects */
@keyframes floatText {
  0% { transform: translateY(0px) translateX(0px); }
  25% { transform: translateY(-5px) translateX(2px); }
  50% { transform: translateY(-8px) translateX(-2px); }
  75% { transform: translateY(-3px) translateX(-1px); }
  100% { transform: translateY(0px) translateX(0px); }
}

/* Apply animations to elements */
.hero-section {
  animation: fadeIn 1.2s ease-out;
  /* Removed background gradient styles to use the one from style.css */
}

.search-form {
  animation: fadeIn 0.8s ease-out;
  position: relative;
  overflow: hidden;
}

.search-form::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, 
    rgba(255,255,255,0) 20%, 
    rgba(255,255,255,0.3) 50%, 
    rgba(255,255,255,0) 80%);
  background-size: 200% auto;
  animation: shine 4s infinite linear;
  pointer-events: none;
}

.feature-item {
  animation: fadeIn 0.6s ease-out;
  animation-fill-mode: both;
}

.feature-item:nth-child(1) { animation-delay: 0.2s; }
.feature-item:nth-child(2) { animation-delay: 0.4s; }
.feature-item:nth-child(3) { animation-delay: 0.6s; }
.feature-item:nth-child(4) { animation-delay: 0.8s; }
.feature-item:nth-child(5) { animation-delay: 1.0s; }

.btn {
  transition: all 0.3s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-cta {
  animation: pulse 2s infinite;
}

/* Modern hover effects for cards */
.card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Floating animation for the domain cards */
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

.domain-card {
  animation: float 6s ease-in-out infinite;
}

/* Staggered animation for domain extensions */
.extension-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: fadeIn 0.8s ease-out;
  animation-fill-mode: both;
}

.extension-card:nth-child(1) { animation-delay: 0.1s; }
.extension-card:nth-child(2) { animation-delay: 0.2s; }
.extension-card:nth-child(3) { animation-delay: 0.3s; }
.extension-card:nth-child(4) { animation-delay: 0.4s; }
.extension-card:nth-child(5) { animation-delay: 0.5s; }
.extension-card:nth-child(6) { animation-delay: 0.6s; }

.extension-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 16px rgba(9, 117, 122, 0.2);
}

/* Growing underline effect for navigation links */
nav ul li a {
  position: relative;
}

nav ul li a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--accent-color);
  transition: width 0.3s ease;
}

nav ul li a:hover::after {
  width: 100%;
}

/* Fade in for sections as they enter viewport */
.scroll-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Loading spinner */
.loader {
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top: 4px solid var(--accent-color);
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Special animation for domain-hero SVG */
.hero-vector {
  animation: filterPulse 5s infinite;
  transition: transform 0.5s ease;
}

.hero-vector:hover {
  transform: scale(1.03);
}

/* Domain feature icons animation */
.feature-icon i {
  transition: all 0.4s ease;
}

.feature-card:hover .feature-icon i {
  transform: scale(1.2);
  color: var(--accent-color);
  animation: rotateIcon 1s ease-in-out;
}

/* Domain Benefits animation */
.benefit-item {
  transition: all 0.3s ease;
}

.benefit-item:hover {
  transform: translateY(-5px);
  background-color: rgba(9, 117, 122, 0.05);
  border-radius: 8px;
}

/* d3v.pro domain highlight animation */
.d3v-highlight {
  display: inline-block;
  color: #09757a;
  font-weight: bold;
  animation: floatText 6s ease-in-out infinite;
  position: relative;
}

.d3v-highlight::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #ff5c35, transparent);
  animation: shine 3s infinite;
}

/* Search button animation */
.search-input-group button {
  overflow: hidden;
  position: relative;
}

.search-input-group button::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 70%);
  opacity: 0;
  transition: opacity 0.5s ease;
  transform: scale(0.5);
  pointer-events: none;
}

.search-input-group button:hover::after {
  opacity: 1;
  transform: scale(1);
  animation: pulse 2s infinite;
}