/* Custom CSS for RankMaster Website */

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Animate on Scroll Classes */
.animate-fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s ease-out forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Floating Animation for Hero Image */
.animate-float {
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

/* Service Card Hover Effects */
.service-card {
  transition: all 0.3s ease;
}

.service-card:hover {
  transform: translateY(-5px);
}

/* Gradient Text Utility */
.text-gradient {
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #2563eb;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #1d4ed8;
}

/* Trust Item Animation */
.trust-item {
  transition: transform 0.3s ease;
}

.trust-item:hover {
  transform: scale(1.05);
}

/* Mobile Menu Animation */
#mobile-menu {
  transform-origin: top;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

#mobile-menu.hidden {
  transform: scaleY(0);
  opacity: 0;
}

#mobile-menu:not(.hidden) {
  transform: scaleY(1);
  opacity: 1;
}

/* Loading State for Form Button */
.btn-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.8;
}

.btn-loading::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  top: 50%;
  left: 50%;
  margin-left: -10px;
  margin-top: -10px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spinner 0.8s linear infinite;
}

@keyframes spinner {
  to {
    transform: rotate(360deg);
  }
}

/* Focus Visible for Accessibility */
*:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

/* Selection Color */
::selection {
  background-color: #2563eb;
  color: white;
}

/* Responsive Typography Adjustments */
@media (max-width: 640px) {
  .text-4xl {
    font-size: 1.875rem;
    line-height: 2.25rem;
  }
  
  .text-5xl {
    font-size: 2.25rem;
    line-height: 2.5rem;
  }
  
  .text-6xl {
    font-size: 2.5rem;
    line-height: 1.2;
  }
}

/* Trust Badge Pulse Animation */
.animate-pulse-slow {
  animation: pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: .5;
  }
}

/* Glass Effect */
.glass {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Hero Background Pattern */
.hero-pattern {
  background-image: radial-gradient(#2563eb 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.05;
}

/* Input Autofill Fix */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus {
  -webkit-text-fill-color: #1f2937;
  -webkit-box-shadow: 0 0 0px 1000px white inset;
  transition: background-color 5000s ease-in-out 0s;
}

/* Print Styles */
@media print {
  .fixed {
    display: none !important;
  }
  
  nav, footer {
    display: none;
  }
  
  section {
    break-inside: avoid;
  }
}